diff --git a/requirements_dev.txt b/requirements_dev.txt new file mode 100644 index 0000000000000000000000000000000000000000..2d36f130e2dac86ba25016f44273fd2515dab6e9 --- /dev/null +++ b/requirements_dev.txt @@ -0,0 +1,5 @@ +django-debug-toolbar==5.0.1 # 2025-02-19 +django-extensions==3.2.3 # 2025-02-19 +Werkzeug==3.1.3 # 2025-02-19 +pyOpenSSL==25.0.0 # 2025-02-19 +djlint==1.36.4 # 2025-02-19 \ No newline at end of file diff --git a/scipost_django/SciPost_v1/settings/base.py b/scipost_django/SciPost_v1/settings/base.py index 9ac4bd5b960c27b049e6d0ad6ad3505436667fa8..9065e835786ad59d04ada5a4622a529fd03cf2e7 100644 --- a/scipost_django/SciPost_v1/settings/base.py +++ b/scipost_django/SciPost_v1/settings/base.py @@ -107,7 +107,6 @@ INSTALLED_APPS = [ "django_celery_results", "django_celery_beat", "django_countries", - "django_extensions", "django_filters", "guardian", "maintenancemode", diff --git a/scipost_django/SciPost_v1/urls.py b/scipost_django/SciPost_v1/urls.py index 42c0979802ebee220ea244d442f96ee64f8aef84..c447cfd57fa59aa5ecae2c4ced977cd0f1197e9d 100644 --- a/scipost_django/SciPost_v1/urls.py +++ b/scipost_django/SciPost_v1/urls.py @@ -129,7 +129,11 @@ urlpatterns = [ ] if settings.DEBUG: - import debug_toolbar + try: + import debug_toolbar - urlpatterns += [path("__debug__/", include(debug_toolbar.urls))] - urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + urlpatterns += [path("__debug__/", include(debug_toolbar.urls))] + urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + except ImportError: + print("Debug toolbar not installed, not adding to urlpatterns.") + pass