From b5fab8c80da8522ced74bd600d613c00be905cfb Mon Sep 17 00:00:00 2001 From: Ahmed Nassar Date: Sat, 21 Dec 2024 20:02:09 +0200 Subject: [PATCH] refactor: Comment out debug toolbar settings for easier local development --- egypt_metro/settings.py | 4 ++-- egypt_metro/urls.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/egypt_metro/settings.py b/egypt_metro/settings.py index 1e31ea8..3d0b005 100644 --- a/egypt_metro/settings.py +++ b/egypt_metro/settings.py @@ -62,7 +62,7 @@ "rest_framework_simplejwt", # JWT authentication "corsheaders", # CORS headers 'drf_yasg', # Swagger - "debug_toolbar", # Debug toolbar + # "debug_toolbar", # Debug toolbar # Custom apps "apps.users.apps.UsersConfig", # Users app @@ -80,7 +80,7 @@ "corsheaders.middleware.CorsMiddleware", # CORS middleware "whitenoise.middleware.WhiteNoiseMiddleware", # WhiteNoise middleware "allauth.account.middleware.AccountMiddleware", # Account middleware - "debug_toolbar.middleware.DebugToolbarMiddleware", # Debug toolbar middleware + # "debug_toolbar.middleware.DebugToolbarMiddleware", # Debug toolbar middleware ] ROOT_URLCONF = "egypt_metro.urls" # Root URL configuration diff --git a/egypt_metro/urls.py b/egypt_metro/urls.py index fa6bdf6..f3e05aa 100644 --- a/egypt_metro/urls.py +++ b/egypt_metro/urls.py @@ -17,7 +17,7 @@ import logging from django.contrib import admin from django.urls import path, include -from egypt_metro import settings +# from egypt_metro import settings from .views import health_check, home # from django.conf.urls.static import static from drf_yasg.views import get_schema_view @@ -79,10 +79,10 @@ # logger.debug('URL patterns: %s', [path.pattern for path in urlpatterns]) # Debug Toolbar (only for development) -if settings.DEBUG: - urlpatterns += [ - path("__debug__/", include("debug_toolbar.urls")), # Debug toolbar - ] +# if settings.DEBUG: +# urlpatterns += [ +# path("__debug__/", include("debug_toolbar.urls")), # Debug toolbar +# ] # Static and media files (if DEBUG is enabled) # if settings.DEBUG: