Update template configuration for Django 1.9
[htsworkflow.git] / htsworkflow / settings / base.py
index 97518e0b44780d1a5ead1440c29649d6ccc0419f..5a7b9c07382fc1b0bde194ce2ae70f483957d97e 100644 (file)
@@ -27,12 +27,29 @@ DEFAULT_API_KEY = INI_OPTIONS.setdefaultsecret('frontend', 'api')
 # Override in settings_local
 DEBUG = False
 
-TEMPLATE_DEBUG = False
+TEMPLATES = [
+    {
+        'BACKEND': 'django.template.backends.django.DjangoTemplates',
+        'DIRS': [join(DJANGO_ROOT, 'templates'),],
+        'APP_DIRS': True,
+        'OPTIONS': {
+            'context_processors': [
+                'django.contrib.auth.context_processors.auth',
+                'django.template.context_processors.debug',
+                'django.template.context_processors.i18n',
+                'django.template.context_processors.media',
+                'django.template.context_processors.static',
+                'django.template.context_processors.tz',
+                'django.contrib.messages.context_processors.messages',
+            ],
+        },
+    },
+]
 
 # Application definition
-AUTHENTICATION_BACKENDS = (
-  'samples.auth_backend.HTSUserModelBackend', )
-CUSTOM_USER_MODEL = 'samples.HTSUser'
+#AUTHENTICATION_BACKENDS = (
+#  'samples.auth_backend.HTSUserModelBackend', )
+#CUSTOM_USER_MODEL = 'samples.HTSUser'
 
 INSTALLED_APPS = [
     'django.contrib.admin',
@@ -60,10 +77,6 @@ MIDDLEWARE_CLASSES = [
     'django.middleware.clickjacking.XFrameOptionsMiddleware',
 ]
 
-TEMPLATE_DIRS = [
-    join(DJANGO_ROOT, 'templates'),
-]
-
 ROOT_URLCONF = 'htsworkflow.urls'
 
 WSGI_APPLICATION = 'wsgi.application'