bifurqué depuis cliss21/lens-site
feat(dev): permets de (dés)activer debug_toolbar
Parent
309fefdc0c
révision
7482f36d5d
|
@ -78,3 +78,4 @@
|
|||
#
|
||||
# Note that it's always disabled in production.
|
||||
#DJANGO_DEBUG=off
|
||||
#DJANGO_DEBUG_TOOLBAR=on
|
||||
|
|
|
@ -5,7 +5,7 @@ Development settings.
|
|||
- add the django-debug-toolbar
|
||||
"""
|
||||
from .base import * # noqa
|
||||
from .base import env
|
||||
from .base import INSTALLED_APPS, MIDDLEWARE, env
|
||||
|
||||
# GENERAL
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -26,7 +26,7 @@ vars().update(env.email_url('DJANGO_EMAIL_URL', default='consolemail://'))
|
|||
# WAGTAIL
|
||||
# ------------------------------------------------------------------------------
|
||||
# http://docs.wagtail.io/en/stable/contributing/styleguide.html
|
||||
INSTALLED_APPS += ['wagtail.contrib.styleguide'] # noqa: F405
|
||||
INSTALLED_APPS += ['wagtail.contrib.styleguide']
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# APPLICATION AND 3RD PARTY LIBRARY SETTINGS
|
||||
|
@ -35,19 +35,16 @@ INSTALLED_APPS += ['wagtail.contrib.styleguide'] # noqa: F405
|
|||
# DJANGO DEBUG TOOLBAR
|
||||
# ------------------------------------------------------------------------------
|
||||
# https://django-debug-toolbar.readthedocs.io/en/stable/installation.html
|
||||
MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware'] # noqa: F405
|
||||
INSTALLED_APPS += ['debug_toolbar'] # noqa: F405
|
||||
|
||||
INTERNAL_IPS = ['127.0.0.1']
|
||||
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'DISABLE_PANELS': ['debug_toolbar.panels.redirects.RedirectsPanel'],
|
||||
'SHOW_TEMPLATE_CONTEXT': True,
|
||||
# Uncomment if jQuery is already loaded by your assets:
|
||||
# 'JQUERY_URL': '',
|
||||
}
|
||||
if env.bool('DJANGO_DEBUG_TOOLBAR', default=False):
|
||||
MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware']
|
||||
INSTALLED_APPS += ['debug_toolbar']
|
||||
INTERNAL_IPS = ['127.0.0.1']
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'DISABLE_PANELS': ['debug_toolbar.panels.redirects.RedirectsPanel'],
|
||||
'SHOW_TEMPLATE_CONTEXT': True,
|
||||
}
|
||||
|
||||
# DJANGO EXTENSIONS
|
||||
# ------------------------------------------------------------------------------
|
||||
# https://django-extensions.readthedocs.io/en/stable/index.html
|
||||
INSTALLED_APPS += ['django_extensions'] # noqa: F405
|
||||
INSTALLED_APPS += ['django_extensions']
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket