mirror of
https://github.com/c0de-archive/django-gallery.git
synced 2025-08-07 23:48:47 +00:00
Add Django Debug Toolbar
This commit is contained in:
@@ -28,6 +28,9 @@ ALLOWED_HOSTS = ['*']
|
||||
|
||||
if DEBUG:
|
||||
INTERNAL_IPS = ('localhost',)
|
||||
DEBUG_TOOLBAR_CONFIG = {
|
||||
'SHOW_TOOLBAR_CALLBACK': (lambda x: True),
|
||||
}
|
||||
|
||||
# SMTP server/relay to send error emails (to ADMINS) from
|
||||
ADMINS = [('c0de', 'c0de@c0defox.es')]
|
||||
@@ -52,6 +55,7 @@ INSTALLED_APPS = [
|
||||
]
|
||||
if DEBUG:
|
||||
INSTALLED_APPS += [
|
||||
'debug_toolbar',
|
||||
'debug_panel'
|
||||
]
|
||||
|
||||
|
@@ -15,7 +15,12 @@ Including another URLconf
|
||||
"""
|
||||
from django.conf.urls import url
|
||||
from django.contrib import admin
|
||||
from django.conf import settings
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^admin/', admin.site.urls),
|
||||
]
|
||||
if settings.DEBUG:
|
||||
urlpatterns += [
|
||||
url(r'^__debug__/', include(__import__('debug_toolbar').urls)),
|
||||
]
|
||||
|
Reference in New Issue
Block a user