Install the django-debug-toolbar plugin for lots of handy info during development
This commit is contained in:
parent
8e974e3745
commit
eaf54a4e83
4 changed files with 33 additions and 8 deletions
|
@ -28,6 +28,7 @@ SECRET_KEY = '6riil57g@r^wprf7mdy((+bs&(6l*phcn9&fd$l0@t-kzj+xww'
|
|||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
INTERNAL_IPS = ['127.0.0.1', '::1']
|
||||
|
||||
# Settings to tighten up security - these can safely be on in dev mode too,
|
||||
# since I dev using a local HTTPS server.
|
||||
|
@ -68,6 +69,7 @@ INSTALLED_APPS = [
|
|||
'django.contrib.staticfiles',
|
||||
|
||||
'compressor',
|
||||
'debug_toolbar',
|
||||
'django_activeurl',
|
||||
'django_agent_trust',
|
||||
'django_otp',
|
||||
|
@ -84,6 +86,7 @@ INSTALLED_APPS = [
|
|||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'debug_toolbar.middleware.DebugToolbarMiddleware',
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
|
|
|
@ -13,6 +13,7 @@ Including another URLconf
|
|||
1. Import the include() function: from django.conf.urls import url, include
|
||||
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.conf import settings
|
||||
from django.conf.urls import include, url
|
||||
from django.contrib import admin
|
||||
from otp_agents.admin import TrustedAgentAdminSite
|
||||
|
@ -43,3 +44,9 @@ urlpatterns = [
|
|||
url(r'^sitemaps/(?P<section>.+)\.xml$', sitemap.sitemap, maps,
|
||||
name='django.contrib.sitemaps.views.sitemap'),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
import debug_toolbar
|
||||
urlpatterns = [
|
||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||
] + urlpatterns
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue