From: Diane Trout Date: Tue, 24 May 2016 22:43:21 +0000 (-0700) Subject: Update template configuration for Django 1.9 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=a82a2b2054b5ec207960dd60ea09b49e002e819e Update template configuration for Django 1.9 --- diff --git a/htsworkflow/settings/base.py b/htsworkflow/settings/base.py index 97518e0..5a7b9c0 100644 --- a/htsworkflow/settings/base.py +++ b/htsworkflow/settings/base.py @@ -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' diff --git a/htsworkflow/settings/myrada.py b/htsworkflow/settings/myrada.py index aad83a8..aad547a 100644 --- a/htsworkflow/settings/myrada.py +++ b/htsworkflow/settings/myrada.py @@ -3,7 +3,6 @@ import os from .local import * DEBUG=True -TEMPLATE_DEBUG = True INTERNAL_IPS = ('127.0.0.1',)