Add config for debug_toolbar when in dev/DEBUG mode
This commit is contained in:
parent
ff723e019d
commit
0427c3f565
@ -5,3 +5,9 @@ from .base import *
|
|||||||
|
|
||||||
# SECURITY WARNING: don't run with debug turned on in production!
|
# SECURITY WARNING: don't run with debug turned on in production!
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
|
|
||||||
|
|
||||||
|
INTERNAL_IPS = ["127.0.0.1"]
|
||||||
|
|
||||||
|
INSTALLED_APPS.append("debug_toolbar")
|
||||||
|
MIDDLEWARE.insert(0, "debug_toolbar.middleware.DebugToolbarMiddleware")
|
||||||
|
@ -17,6 +17,7 @@ from django.contrib import admin
|
|||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.urls import include, path
|
from django.urls import include, path
|
||||||
from django.contrib.auth.views import LoginView, LogoutView
|
from django.contrib.auth.views import LoginView, LogoutView
|
||||||
|
from django.conf import settings
|
||||||
|
|
||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
@ -47,3 +48,6 @@ urlpatterns = [
|
|||||||
),
|
),
|
||||||
path("markdownx/", include("markdownx.urls")),
|
path("markdownx/", include("markdownx.urls")),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
|
urlpatterns.append(path("__debug__/", include("debug_toolbar.urls")))
|
||||||
|
Loading…
Reference in New Issue
Block a user