Some changes that the settings to reduce the logic in the local_settings.py
This commit is contained in:
@@ -5,6 +5,7 @@ gettext = lambda s: s
|
|||||||
|
|
||||||
ADMINS = (('Max Mustermann', 'email@example.com'),)
|
ADMINS = (('Max Mustermann', 'email@example.com'),)
|
||||||
ALLOWED_HOSTS = ['.kasu.at']
|
ALLOWED_HOSTS = ['.kasu.at']
|
||||||
|
DEBUG = False
|
||||||
FORCE_SCRIPT_NAME = ""
|
FORCE_SCRIPT_NAME = ""
|
||||||
INTERNAL_IPS = ('127.0.0.1',)
|
INTERNAL_IPS = ('127.0.0.1',)
|
||||||
MANAGERS = ADMINS
|
MANAGERS = ADMINS
|
||||||
@@ -63,7 +64,7 @@ CACHES = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#Request Middleware
|
# Request Middleware
|
||||||
MIDDLEWARE_CLASSES = [
|
MIDDLEWARE_CLASSES = [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
@@ -77,7 +78,7 @@ MIDDLEWARE_CLASSES = [
|
|||||||
'mahjong_ranking.middleware.DenormalizationUpdateMiddleware',
|
'mahjong_ranking.middleware.DenormalizationUpdateMiddleware',
|
||||||
]
|
]
|
||||||
|
|
||||||
#Template Settings
|
# Template Settings
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
{
|
{
|
||||||
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
'BACKEND': 'django.template.backends.django.DjangoTemplates',
|
||||||
@@ -109,7 +110,7 @@ TEMPLATES = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
#E-Mail Settings (set in local_settings)
|
# E-Mail Settings (set in local_settings)
|
||||||
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
|
||||||
EMAIL_HOST = ""
|
EMAIL_HOST = ""
|
||||||
EMAIL_PORT = ""
|
EMAIL_PORT = ""
|
||||||
@@ -182,7 +183,7 @@ FACEBOOK_ACCESS_TOKEN = ''
|
|||||||
REDACTOR_OPTIONS = {'lang': 'de', 'linebreaks': True}
|
REDACTOR_OPTIONS = {'lang': 'de', 'linebreaks': True}
|
||||||
REDACTOR_UPLOAD = 'uploads/'
|
REDACTOR_UPLOAD = 'uploads/'
|
||||||
|
|
||||||
#crendetials for reCaptcha (set in local_settings)
|
# crendetials for reCaptcha (set in local_settings)
|
||||||
RECAPTCHA_PUBLIC_KEY = ''
|
RECAPTCHA_PUBLIC_KEY = ''
|
||||||
RECAPTCHA_PRIVATE_KEY = ''
|
RECAPTCHA_PRIVATE_KEY = ''
|
||||||
RECAPTCHA_THEME = 'red'
|
RECAPTCHA_THEME = 'red'
|
||||||
@@ -254,3 +255,9 @@ try:
|
|||||||
from .local_settings import *
|
from .local_settings import *
|
||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
if DEBUG:
|
||||||
|
TEMPLATES[0]['OPTIONS']['loaders'] = [
|
||||||
|
'django.template.loaders.filesystem.Loader',
|
||||||
|
'django.template.loaders.app_directories.Loader',
|
||||||
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user