Add the debug template context processor and INTERNAL_IPS with default value to the base settings file
This commit is contained in:
@@ -190,6 +190,7 @@ TEMPLATE_LOADERS = (
|
|||||||
|
|
||||||
TEMPLATE_CONTEXT_PROCESSORS = (
|
TEMPLATE_CONTEXT_PROCESSORS = (
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
|
'django.core.context_processors.debug',
|
||||||
'django.core.context_processors.i18n',
|
'django.core.context_processors.i18n',
|
||||||
'django.core.context_processors.static',
|
'django.core.context_processors.static',
|
||||||
'django.core.context_processors.request',
|
'django.core.context_processors.request',
|
||||||
@@ -214,6 +215,7 @@ WEB_THEME_ENABLE_SCROLL_JS = False
|
|||||||
# --------- Django -------------------
|
# --------- Django -------------------
|
||||||
LOGIN_URL = 'common:login_view'
|
LOGIN_URL = 'common:login_view'
|
||||||
LOGIN_REDIRECT_URL = 'main:home'
|
LOGIN_REDIRECT_URL = 'main:home'
|
||||||
|
INTERNAL_IPS = ('127.0.0.1',)
|
||||||
# -------- LoginRequiredMiddleware ----------
|
# -------- LoginRequiredMiddleware ----------
|
||||||
LOGIN_EXEMPT_URLS = (
|
LOGIN_EXEMPT_URLS = (
|
||||||
r'^favicon\.ico$',
|
r'^favicon\.ico$',
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ TEMPLATE_DEBUG = DEBUG
|
|||||||
|
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
INTERNAL_IPS = ('127.0.0.1',)
|
|
||||||
|
|
||||||
TEMPLATE_LOADERS = (
|
TEMPLATE_LOADERS = (
|
||||||
'django.template.loaders.filesystem.Loader',
|
'django.template.loaders.filesystem.Loader',
|
||||||
'django.template.loaders.app_directories.Loader'
|
'django.template.loaders.app_directories.Loader'
|
||||||
@@ -19,8 +17,4 @@ INSTALLED_APPS += (
|
|||||||
'django_extensions',
|
'django_extensions',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Stop debug toolbar patching!
|
|
||||||
# see https://github.com/django-debug-toolbar/django-debug-toolbar/issues/524
|
|
||||||
TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.debug',)
|
|
||||||
|
|
||||||
WSGI_AUTO_RELOAD = True
|
WSGI_AUTO_RELOAD = True
|
||||||
|
|||||||
@@ -7,8 +7,6 @@ TEMPLATE_DEBUG = DEBUG
|
|||||||
|
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
|
|
||||||
INTERNAL_IPS = ('127.0.0.1',)
|
|
||||||
|
|
||||||
TEMPLATE_LOADERS = (
|
TEMPLATE_LOADERS = (
|
||||||
'django.template.loaders.filesystem.Loader',
|
'django.template.loaders.filesystem.Loader',
|
||||||
'django.template.loaders.app_directories.Loader'
|
'django.template.loaders.app_directories.Loader'
|
||||||
@@ -24,8 +22,6 @@ INSTALLED_APPS += (
|
|||||||
# see https://github.com/django-debug-toolbar/django-debug-toolbar/issues/524
|
# see https://github.com/django-debug-toolbar/django-debug-toolbar/issues/524
|
||||||
DEBUG_TOOLBAR_PATCH_SETTINGS = False
|
DEBUG_TOOLBAR_PATCH_SETTINGS = False
|
||||||
|
|
||||||
TEMPLATE_CONTEXT_PROCESSORS += ('django.core.context_processors.debug',)
|
|
||||||
|
|
||||||
WSGI_AUTO_RELOAD = True
|
WSGI_AUTO_RELOAD = True
|
||||||
|
|
||||||
MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES
|
MIDDLEWARE_CLASSES = ('debug_toolbar.middleware.DebugToolbarMiddleware',) + MIDDLEWARE_CLASSES
|
||||||
|
|||||||
Reference in New Issue
Block a user