Commit eb6535aa authored by Daniel W Bond's avatar Daniel W Bond

...the 1.10 upgrade also involves changing the format of the template...

...the 1.10 upgrade also involves changing the format of the template processing including the context_processor imports location
parent 7103d7d2
...@@ -25,10 +25,9 @@ SECRET_KEY = secret.SECRET_KEY ...@@ -25,10 +25,9 @@ SECRET_KEY = secret.SECRET_KEY
# These configurations are set by default for a local development environment. Turning # These configurations are set by default for a local development environment. Turning
# off debug mode will display 404 and 500 error pages instead of detailed logs. # off debug mode will display 404 and 500 error pages instead of detailed logs.
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = True
# the domains this application will be deployed on, e.g. which # the domains this application will be deployed on, e.g. which
# domains this app should listen to requests from. # domains this app should listen to requests from.
ALLOWED_HOSTS = ['127.0.0.1'] ALLOWED_HOSTS = ['localhost', '127.0.0.1']
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.7/howto/static-files/ # https://docs.djangoproject.com/en/1.7/howto/static-files/
...@@ -37,28 +36,35 @@ STATICFILES_DIRS = ( ...@@ -37,28 +36,35 @@ STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'), os.path.join(BASE_DIR, 'static'),
) )
# where template files are located TEMPLATES = [
TEMPLATE_DIRS = ( {
os.path.join(BASE_DIR, 'templates'), 'BACKEND': 'django.template.backends.django.DjangoTemplates',
# may specify to avoid requiring paths 'DIRS': [
os.path.join(BASE_DIR, 'housing/templates'), # where template files are located
os.path.join(BASE_DIR, 'accounts/templates'), os.path.join(BASE_DIR, 'templates'),
) # may specify to avoid requiring paths
TEMPLATE_LOADERS = ( os.path.join(BASE_DIR, 'housing/templates'),
'django.template.loaders.filesystem.Loader', os.path.join(BASE_DIR, 'accounts/templates'),
'django.template.loaders.app_directories.Loader', ],
) 'OPTIONS': {
TEMPLATE_CONTEXT_PROCESSORS = ( 'context_processors': [
'django.contrib.auth.context_processors.auth', 'django.contrib.auth.context_processors.auth',
'django.core.context_processors.debug', 'django.template.context_processors.debug',
'django.core.context_processors.i18n', 'django.template.context_processors.i18n',
'django.core.context_processors.media', 'django.template.context_processors.media',
'django.core.context_processors.static', 'django.template.context_processors.static',
'django.contrib.messages.context_processors.messages', 'django.template.context_processors.tz',
'django.core.context_processors.request', 'django.contrib.messages.context_processors.messages',
'allauth.account.context_processors.account', 'django.template.context_processors.request',
'allauth.socialaccount.context_processors.socialaccount', ],
) 'loaders': [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
],
'debug': DEBUG,
}
}
]
# Application definition # Application definition
INSTALLED_APPS = ( INSTALLED_APPS = (
...@@ -77,12 +83,13 @@ INSTALLED_APPS = ( ...@@ -77,12 +83,13 @@ INSTALLED_APPS = (
'welcome', 'welcome',
'core', 'core',
# packages # packages
'analytical',
'cas',
'crispy_forms', 'crispy_forms',
'django_gravatar', 'django_gravatar',
'analytical',
'randomslugfield',
'haystack', 'haystack',
'multiselectfield', 'multiselectfield',
'randomslugfield',
'rest_framework', 'rest_framework',
# social media authentication # social media authentication
'allauth', 'allauth',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment