Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add command to change site name and hostname to README.md #281

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ docker-compose exec get_together python3 manage.py createsuperuser

You can then connect to the container by going to localhost:8000

## Changing name and hostname

If you want to use this software with an own hostname you need to change the site settings:

`./env/bin/python manage.py shell -c "from django.contrib.sites.models import Site; Site.objects.filter(domain='example.com').update(name='My Site', domain='mysite.tld')"`

## Test Federation

You can import live event data into your "Searchable" table with this command:
Expand Down
4 changes: 4 additions & 0 deletions get_together/templates/get_together/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

{% block content %}
<div class="container">
{% if settings.GOOGLE_MAPS_API_KEY %}
<div id="map" class="col-sm-12 mb-2" style="height: 300px;"></div>
{% endif %}
<div class="row navbar-inverse bg-inverse mb-3">
<div class="col-12 navbar-text">
<form action="{% url 'home' %}" method="GET">{{search_form}} <input type="submit" value="{% trans "Search" %}" class="btn btn-primary btn-sm"></form>
Expand Down Expand Up @@ -167,6 +169,7 @@ <h3>{% trans "Nearby Teams" %}</h3>
{% endblock %}

{% block javascript %}
{% if settings.GOOGLE_MAPS_API_KEY %}
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key={{settings.GOOGLE_MAPS_API_KEY}}&libraries=places"></script>
<script src="{% static 'js/markerclusterer.js' %}"></script>
<script type="text/javascript">
Expand Down Expand Up @@ -239,6 +242,7 @@ <h3>{% trans "Nearby Teams" %}</h3>
html_lng: 0.0
});
</script>
{% endif%}

<script src="{% static 'js/jquery-ui-lookup.js' %}"></script>
<script type="text/javascript">
Expand Down
4 changes: 4 additions & 0 deletions get_together/templates/get_together/new_event/add_place.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ <h2>{% trans "Choose your meeting place" %}</h2>
{% csrf_token %}
<input type="hidden" id="id_id" name="id" value="" />
{% include "events/place_form.html" %}
{% if settings.GOOGLE_MAPS_API_KEY %}
<div class="fluid-layout" id="place-map"></div>
{% endif %}
<br />
<button type="submit" class="btn btn-primary">{% trans "Add Place" %}</button>
</form>
Expand All @@ -22,6 +24,7 @@ <h2>{% trans "Choose your meeting place" %}</h2>
{% endblock %}

{% block javascript %}
{% if settings.GOOGLE_MAPS_API_KEY %}
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key={{settings.GOOGLE_MAPS_API_KEY}}&libraries=places"></script>
<script type="text/javascript">
/*
Expand Down Expand Up @@ -202,6 +205,7 @@ <h2>{% trans "Choose your meeting place" %}</h2>
html_lng: $("#id_longitude")
});
</script>
{% endif %}

<script src="{% static 'js/jquery-ui-lookup.js' %}"></script>
<script type="text/javascript">
Expand Down
5 changes: 4 additions & 1 deletion get_together/templates/get_together/orgs/show_org.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ <h2>{% blocktrans with org_name=org.name %}Welcome to {{ org_name }}{% endblockt
{% endif %}
</div>

{% if settings.GOOGLE_MAPS_API_KEY %}
<div id="map" class="col-sm-12 mb-2" style="height: 300px;">

</div>
{% endif%}

{% if org.description %}
<div class="container container-secondary mb-3 gt-usertext">
Expand Down Expand Up @@ -116,6 +118,7 @@ <h6 class="mt-0 mb-0"><a href="{% url 'show-team-by-slug' member.slug %}" title=
{% endblock %}

{% block javascript %}
{% if settings.GOOGLE_MAPS_API_KEY %}
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key={{settings.GOOGLE_MAPS_API_KEY}}&libraries=places"></script>
<script src="{% static 'js/markerclusterer.js' %}"></script>
<script type="text/javascript">
Expand Down Expand Up @@ -183,6 +186,6 @@ <h6 class="mt-0 mb-0"><a href="{% url 'show-team-by-slug' member.slug %}" title=
html_lng: 0.0
});
</script>

{% endif %}

{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ <h2>{% trans "Choose your meeting place" %}</h2>
{% csrf_token %}
<input type="hidden" id="id_id" name="id" value="" />
{% include "events/place_form.html" %}
{% if settings.GOOGLE_MAPS_API_KEY %}
<div class="fluid-layout" id="place-map"></div>
{% endif %}
<br />
<button type="submit" class="btn btn-primary">{% trans "Add Place" %}</button>
</form>
Expand All @@ -23,6 +25,7 @@ <h2>{% trans "Choose your meeting place" %}</h2>
{% endblock %}

{% block javascript %}
{% if settings.GOOGLE_MAPS_API_KEY %}
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key={{settings.GOOGLE_MAPS_API_KEY}}&libraries=places"></script>
<script type="text/javascript">
/*
Expand Down Expand Up @@ -203,6 +206,7 @@ <h2>{% trans "Choose your meeting place" %}</h2>
html_lng: $("#id_longitude")
});
</script>
{% endif %}

<script src="{% static 'js/jquery-ui-lookup.js' %}"></script>
<script type="text/javascript">
Expand Down
4 changes: 4 additions & 0 deletions get_together/templates/get_together/places/create_place.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ <h2>{% trans "Choose your meeting place" %}</h2>
{% csrf_token %}
<input type="hidden" id="id_id" name="id" value="" />
{% include "events/place_form.html" %}
{% if settings.GOOGLE_MAPS_API_KEY %}
<div class="fluid-layout" id="place-map"></div>
{% endif %}
<br />
<button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
</form>
Expand All @@ -23,6 +25,7 @@ <h2>{% trans "Choose your meeting place" %}</h2>
{% endblock %}

{% block javascript %}
{% if settings.GOOGLE_MAPS_API_KEY %}
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key={{settings.GOOGLE_MAPS_API_KEY}}&libraries=places"></script>
<script type="text/javascript">
/*
Expand Down Expand Up @@ -203,6 +206,7 @@ <h2>{% trans "Choose your meeting place" %}</h2>
html_lng: $("#id_longitude")
});
</script>
{% endif %}

<script src="{% static 'js/jquery-ui-lookup.js' %}"></script>
<script type="text/javascript">
Expand Down
2 changes: 2 additions & 0 deletions get_together/templates/get_together/places/show_place.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ <h2>{{ place.name }}
</tr>
</table>

{% if settings.GOOGLE_MAPS_API_KEY %}
<iframe
width="720"
height="400"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key={{ settings.GOOGLE_MAPS_API_KEY }}&q={{place.name|urlencode}}%2C%20{{place.address|urlencode}}&zoom=17"
allowfullscreen>
</iframe>
{% endif %}

</div>

Expand Down