diff --git a/AKPlanning/settings.py b/AKPlanning/settings.py index 370c1e4d990a22cafb188de22295a3063784f8e9..0dbfeb5c69e6e8d902aaa0179dbdde356786ff14 100644 --- a/AKPlanning/settings.py +++ b/AKPlanning/settings.py @@ -44,6 +44,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'debug_toolbar', 'bootstrap4', 'fontawesome_5', 'timezone_field', @@ -53,6 +54,7 @@ INSTALLED_APPS = [ ] MIDDLEWARE = [ + 'debug_toolbar.middleware.DebugToolbarMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.locale.LocaleMiddleware', @@ -132,6 +134,8 @@ LANGUAGES = [ ('en', _('English')), ] +INTERNAL_IPS = ['127.0.0.1', '::1'] + # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/2.2/howto/static-files/ diff --git a/AKPlanning/urls.py b/AKPlanning/urls.py index e7c592d83ca30995a68119d3c43077f20827bbc6..2386721cbb5bc08f4aa84e1f77a5d0264cb8cfc4 100644 --- a/AKPlanning/urls.py +++ b/AKPlanning/urls.py @@ -16,6 +16,7 @@ Including another URLconf from django.apps import apps from django.contrib import admin from django.urls import path, include +import debug_toolbar urlpatterns = [ path('admin/', admin.site.urls), @@ -23,6 +24,7 @@ urlpatterns = [ path('accounts/', include('registration.backends.simple.urls')), path('', include('AKModel.urls', namespace='model')), path('i18n/', include('django.conf.urls.i18n')), + path('__debug__/', include(debug_toolbar.urls)), ] # Load URLs dynamically (only if components are active) diff --git a/requirements.txt b/requirements.txt index ea1f26faff6c67ca94bbb2689b13c7675e65c224..b80741f0ec81db11795a4d9f89ef987ea07349b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,4 +6,5 @@ django-timezone-field==4.0 djangorestframework==3.11.0 django-simple-history==2.10.0 django-registration-redux==2.8 +django-debug-toolbar==3.2 mysqlclient==1.4.6 # for production deployment