Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion DataSpace/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,12 @@
"api.middleware.logging.StructuredLoggingMiddleware",
]

# Add debug toolbar middleware if in debug mode
# Add debug toolbar app and middleware if in debug mode. Both are required --
# the middleware alone crashes on any request/check that touches
# debug_toolbar's models: "HistoryEntry doesn't declare an explicit
# app_label and isn't in an application in INSTALLED_APPS".
if DEBUG:
INSTALLED_APPS.append("debug_toolbar")
MIDDLEWARE.insert(1, "debug_toolbar.middleware.DebugToolbarMiddleware")

MIDDLEWARE += [
Expand Down
Loading