Skip to content

Propagate handler403 value when wrapping urlconf #285

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2012
Merged

Propagate handler403 value when wrapping urlconf #285

merged 2 commits into from
Jun 3, 2012

Conversation

kmichel
Copy link
Contributor

@kmichel kmichel commented May 31, 2012

This is just a minor patch to allow overriding handler403 value while using the toolbar.

@@ -84,6 +84,8 @@ def process_request(self, request):
new_urlconf.urlpatterns = debug_toolbar.urls.urlpatterns + \
list(urlconf.urlpatterns)

if hasattr(urlconf, 'handler403'):
new_urlconf.handler404 = urlconf.handler403
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be handler403

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and I managed to introduce an error in two simple lines of code...

I shouldn't have written them using the online interface, sorry.

It was propagated to handler404 instead of handler403.
dcramer added a commit that referenced this pull request Jun 3, 2012
Propagate handler403 value when wrapping urlconf
@dcramer dcramer merged commit 7b610e9 into django-commons:master Jun 3, 2012
ryneeverett pushed a commit to ryneeverett/django-debug-toolbar that referenced this pull request Oct 2, 2016
Propagate handler403 value when wrapping urlconf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants