Commit 6523aadf authored by Mathieu Courcelles's avatar Mathieu Courcelles

Adds debug toolbar

parent a6fa3086
Pipeline #14981155 passed with stage
in 1 minute and 11 seconds
......@@ -131,7 +131,7 @@ TEMPLATES = [
},
]
INSTALLED_APPS = (
INSTALLED_APPS = [
# Visual enhancement
'grappelli.dashboard',
'grappelli',
......@@ -153,7 +153,9 @@ INSTALLED_APPS = (
# CLMSVault app
'CLMSVault.CLMSVault_app',
'defender',
)
]
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
......
......@@ -84,4 +84,17 @@ CACHES = {
MIDDLEWARE.append('defender.middleware.FailedLoginMiddleware')
DEFENDER_LOGIN_FAILURE_LIMIT = 10
DEFENDER_BEHIND_REVERSE_PROXY = True
DEFENDER_REDIS_URL = 'redis://redis:6379/0'
\ No newline at end of file
DEFENDER_REDIS_URL = 'redis://redis:6379/0'
if DEBUG:
INSTALLED_APPS += ['debug_toolbar']
MIDDLEWARE.insert(0, 'debug_toolbar.middleware.DebugToolbarMiddleware')
def toolbar_callback(request):
return True
DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': toolbar_callback
}
\ No newline at end of file
......@@ -53,3 +53,9 @@ urlpatterns = [
# Admin customization
# Ref: http://stackoverflow.com/questions/4938491/django-admin-change-header-django-administration-text
admin.site.index_title = ''
if settings.DEBUG:
import debug_toolbar
urlpatterns = [
url(r'^__debug__/', include(debug_toolbar.urls)),
] + urlpatterns
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment