Skip to content

Commit

Permalink
Use new TEMPLATES variable in Django settings
Browse files Browse the repository at this point in the history
  • Loading branch information
adelq committed Oct 7, 2016
1 parent 96f095d commit 4eb5654
Showing 1 changed file with 21 additions and 24 deletions.
45 changes: 21 additions & 24 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,27 @@
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'fedj_fw+i*%ff#**q7+-ss@4%cbfyninbruc@$ea0k%mmf$1#3'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
# 'django.template.loaders.eggs.Loader',
)
# New Django TEMPLATE settings that supersedes all
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
os.path.join(PROJECT_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',
],
},
},
]

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
Expand All @@ -120,14 +135,6 @@

ROOT_URLCONF = 'urls'

TEMPLATE_DIRS = (
os.path.join(PROJECT_ROOT, "templates"),
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)


INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
Expand Down Expand Up @@ -174,16 +181,6 @@
}
}

TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages"
)

ALLOWED_HOSTS = [
".penncfa.com",
".penncfa.com.",
Expand Down

0 comments on commit 4eb5654

Please sign in to comment.