summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py66
1 files changed, 34 insertions, 32 deletions
diff --git a/settings.py b/settings.py
index 7571f0fc..e64e8620 100644
--- a/settings.py
+++ b/settings.py
@@ -3,7 +3,6 @@ import os
## Set the debug values
DEBUG = False
-TEMPLATE_DEBUG = DEBUG
DEBUG_TOOLBAR = False
## Notification admins
@@ -45,28 +44,26 @@ LOGIN_REDIRECT_URL = '/'
# Set django's User stuff to use our profile model
AUTH_PROFILE_MODULE = 'devel.UserProfile'
-# We add a processor to determine if the request is secure or not
-TEMPLATE_CONTEXT_PROCESSORS = (
- 'django.contrib.auth.context_processors.auth',
- 'django.core.context_processors.debug',
- 'django.contrib.messages.context_processors.messages',
- 'main.context_processors.secure',
- 'main.context_processors.branding',
-)
-
-TEMPLATE_DIRS = (
- # Put strings here, like "/home/html/django_templates".
- # Always use forward slashes, even on Windows.
- '%s/templates' % DEPLOY_PATH,
-)
-
-TEMPLATE_LOADERS = (
- 'django_jinja.loaders.FileSystemLoader',
- 'django_jinja.loaders.AppLoader',
-)
-
-# Send templates matching the following to the Jinja2 engine
-DEFAULT_JINJA2_TEMPLATE_EXTENSION = '.jinja'
+from os import path
+TEMPLATES = [
+ {
+ 'BACKEND': 'django.template.backends.django.DjangoTemplates',
+ 'DIRS': [
+ path.join(DEPLOY_PATH, 'templates')
+ ],
+ 'APP_DIRS': True,
+ 'OPTIONS': {
+ 'debug': DEBUG,
+ 'context_processors': [
+ 'django.contrib.auth.context_processors.auth',
+ 'django.core.context_processors.debug',
+ 'django.contrib.messages.context_processors.messages',
+ 'main.context_processors.secure',
+ 'main.context_processors.branding',
+ ],
+ }
+ }
+]
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
@@ -118,7 +115,6 @@ INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.staticfiles',
'django_countries',
- 'django_jinja',
'main',
'mirrors',
@@ -201,15 +197,21 @@ COUNTRIES_OVERRIDE = {
'US': 'United States',
}
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = '00000000000000000000000000000000000000000000000'
+
+DATABASES = {
+ 'default': {
+ 'ENGINE' : 'django.db.backends.sqlite3',
+ 'NAME' : 'database.db',
+ },
+}
+
## Import local settings
-from local_settings import *
-
-# Enable caching templates in production environments
-if not TEMPLATE_DEBUG:
- TEMPLATE_LOADERS = (
- ('django.template.loaders.cached.Loader', TEMPLATE_LOADERS),
- )
- JINJA2_BYTECODE_CACHE_ENABLE = True
+try:
+ from local_settings import *
+except ImportError:
+ pass
# Enable the debug toolbar if requested
if DEBUG_TOOLBAR: