Skip to content

Commit

Permalink
🚸 Set up timezone detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jh0ker committed Oct 29, 2018
1 parent d1950bc commit be5cc3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/cms/templates/admin/cms/change_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "admin/change_form.html" %}

{% block admin_change_form_document_ready %}
{% load tz_detect %}
{% tz_detect %}
{% endblock %}
1 change: 1 addition & 0 deletions app/main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'tz_detect.middleware.TimezoneMiddleware',
]

ROOT_URLCONF = 'main.urls'
Expand Down
1 change: 1 addition & 0 deletions app/main/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@
urlpatterns = [
path('admin/', admin.site.urls),
url(r'^api/v1/', include(router.urls)),
url(r'^tz_detect/', include('tz_detect.urls')),
]

0 comments on commit be5cc3f

Please sign in to comment.