Skip to content

Commit 6207ea9

Browse files
committed
Propagate handler403 value when wrapping urlconf
1 parent 599d76e commit 6207ea9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

debug_toolbar/middleware.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ def process_request(self, request):
8484
new_urlconf.urlpatterns = debug_toolbar.urls.urlpatterns + \
8585
list(urlconf.urlpatterns)
8686

87+
if hasattr(urlconf, 'handler403'):
88+
new_urlconf.handler404 = urlconf.handler403
8789
if hasattr(urlconf, 'handler404'):
8890
new_urlconf.handler404 = urlconf.handler404
8991
if hasattr(urlconf, 'handler500'):

0 commit comments

Comments
 (0)