Use custom SHOW_TOOLBAR_CALLBACK
This commit is contained in:
parent
6a982f8db2
commit
6f5c0a1b7c
1 changed files with 7 additions and 2 deletions
|
@ -373,6 +373,10 @@ GVA_ENVIRONMENT = get_env_variable('GVA_ENVIRONMENT', default='prod')
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#static-root
|
||||||
STATIC_ROOT = '/srv/gnuviechadmin/static/'
|
STATIC_ROOT = '/srv/gnuviechadmin/static/'
|
||||||
|
|
||||||
|
def show_debug_toolbar(request):
|
||||||
|
return DEBUG == True and GVA_ENVIRONMENT == 'local'
|
||||||
|
|
||||||
|
|
||||||
if GVA_ENVIRONMENT == 'local':
|
if GVA_ENVIRONMENT == 'local':
|
||||||
# ######### DEBUG CONFIGURATION
|
# ######### DEBUG CONFIGURATION
|
||||||
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
|
||||||
|
@ -422,9 +426,10 @@ if GVA_ENVIRONMENT == 'local':
|
||||||
'userdbs', 'websites']]))
|
'userdbs', 'websites']]))
|
||||||
|
|
||||||
DEBUG_TOOLBAR_PATCH_SETTINGS = False
|
DEBUG_TOOLBAR_PATCH_SETTINGS = False
|
||||||
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
|
'SHOW_TOOLBAR_CALLBACK': 'gnuviechadmin.settings.show_debug_toolbar',
|
||||||
|
}
|
||||||
|
|
||||||
# http://django-debug-toolbar.readthedocs.org/en/latest/installation.html
|
|
||||||
INTERNAL_IPS = ('127.0.0.1', '10.0.2.2')
|
|
||||||
# ######### END TOOLBAR CONFIGURATION
|
# ######### END TOOLBAR CONFIGURATION
|
||||||
elif GVA_ENVIRONMENT == 'test':
|
elif GVA_ENVIRONMENT == 'test':
|
||||||
PASSWORD_HASHERS = (
|
PASSWORD_HASHERS = (
|
||||||
|
|
Loading…
Reference in a new issue