diff --git a/cmsmanage/settings/dev_base.py b/cmsmanage/settings/dev_base.py index e8aab68..cdcab7a 100644 --- a/cmsmanage/settings/dev_base.py +++ b/cmsmanage/settings/dev_base.py @@ -5,3 +5,9 @@ from .base import * # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True + + +INTERNAL_IPS = ["127.0.0.1"] + +INSTALLED_APPS.append("debug_toolbar") +MIDDLEWARE.insert(0, "debug_toolbar.middleware.DebugToolbarMiddleware") diff --git a/cmsmanage/urls.py b/cmsmanage/urls.py index a9eb61a..99c2fa0 100644 --- a/cmsmanage/urls.py +++ b/cmsmanage/urls.py @@ -17,6 +17,7 @@ from django.contrib import admin from django.shortcuts import redirect from django.urls import include, path from django.contrib.auth.views import LoginView, LogoutView +from django.conf import settings urlpatterns = [ @@ -47,3 +48,6 @@ urlpatterns = [ ), path("markdownx/", include("markdownx.urls")), ] + +if settings.DEBUG: + urlpatterns.append(path("__debug__/", include("debug_toolbar.urls")))