forked from DGNum/gestioCOF
Minor fixes in settings/
- Typo - Removes old comments - Moves the template debug context processor back to the common file: it won't be loaded anyway if `DEBUG=False`. - Ddt's middleware should be loaded first
This commit is contained in:
parent
40abe81402
commit
ff73a635f8
2 changed files with 6 additions and 10 deletions
|
@ -3,7 +3,7 @@
|
||||||
Django common settings for cof project.
|
Django common settings for cof project.
|
||||||
|
|
||||||
Everything which is supposed to be identical between the production server and
|
Everything which is supposed to be identical between the production server and
|
||||||
the local development serveur should be here.
|
the local development server should be here.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
@ -79,6 +79,7 @@ TEMPLATES = [
|
||||||
'APP_DIRS': True,
|
'APP_DIRS': True,
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'context_processors': [
|
'context_processors': [
|
||||||
|
'django.template.context_processors.debug',
|
||||||
'django.template.context_processors.request',
|
'django.template.context_processors.request',
|
||||||
'django.contrib.auth.context_processors.auth',
|
'django.contrib.auth.context_processors.auth',
|
||||||
'django.contrib.messages.context_processors.messages',
|
'django.contrib.messages.context_processors.messages',
|
||||||
|
@ -118,10 +119,6 @@ USE_L10N = True
|
||||||
|
|
||||||
USE_TZ = True
|
USE_TZ = True
|
||||||
|
|
||||||
|
|
||||||
# Media upload (through ImageField, SiteField)
|
|
||||||
# https://docs.djangoproject.com/en/1.9/ref/models/fields/
|
|
||||||
|
|
||||||
# Various additional settings
|
# Various additional settings
|
||||||
SITE_ID = 1
|
SITE_ID = 1
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,6 @@ EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||||
|
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
TEMPLATES[0]["OPTIONS"]["context_processors"] += [
|
|
||||||
'django.template.context_processors.debug'
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# Apache static/media config
|
# Apache static/media config
|
||||||
|
@ -46,7 +42,10 @@ def show_toolbar(request):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
INSTALLED_APPS += ["debug_toolbar"]
|
INSTALLED_APPS += ["debug_toolbar"]
|
||||||
MIDDLEWARE_CLASSES += ["debug_toolbar.middleware.DebugToolbarMiddleware"]
|
MIDDLEWARE_CLASSES = (
|
||||||
|
["debug_toolbar.middleware.DebugToolbarMiddleware"]
|
||||||
|
+ MIDDLEWARE_CLASSES
|
||||||
|
)
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
'SHOW_TOOLBAR_CALLBACK': show_toolbar,
|
'SHOW_TOOLBAR_CALLBACK': show_toolbar,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue