Private
Public Access
1
0

added timezone detection

This commit is contained in:
Sander Roosendaal
2017-09-03 12:11:19 +02:00
parent 58ab1f87bb
commit bd46c5bcd7
6 changed files with 15 additions and 3 deletions

View File

@@ -62,7 +62,8 @@ INSTALLED_APPS = [
'corsheaders',
'analytical',
'cookielaw',
'django_extensions'
'django_extensions',
'tz_detect'
]
AUTHENTICATION_BACKENDS = (
@@ -90,6 +91,7 @@ MIDDLEWARE_CLASSES = [
'django.contrib.messages.middleware.MessageMiddleware',
'async_messages.middleware.AsyncMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'tz_detect.middleware.TimezoneMiddleware',
]
ROOT_URLCONF = 'rowsandall_app.urls'
@@ -174,7 +176,7 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/1.9/topics/i18n/
TIME_ZONE = 'UTC'
#TIME_ZONE = 'UTC'
USE_I18N = True
@@ -182,6 +184,8 @@ USE_L10N = True
USE_TZ = True
TZ_DETECT_COUNTRIES = ('US','DE','GB','CZ','FR','IT')
LOCALE_PATHS = (
os.path.join(BASE_DIR, 'locale'),
os.path.join(BASE_DIR, 'cvkbrno/locale'),

View File

@@ -71,6 +71,7 @@ urlpatterns += [
url(r'^tp\_callback',rowersviews.rower_process_tpcallback),
url(r'^twitter\_callback',rowersviews.rower_process_twittercallback),
url(r'^i18n/', include('django.conf.urls.i18n')),
url(r'^tz_detect/', include('tz_detect.urls')),
]