Skip to content
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

404 error on django 2.2 #1152

Closed
ghost opened this issue Apr 7, 2019 · 6 comments
Closed

404 error on django 2.2 #1152

ghost opened this issue Apr 7, 2019 · 6 comments

Comments

@ghost
Copy link

ghost commented Apr 7, 2019

django:2.2
python:3.7.3

in django 2.1 it's work

but in django 2.2 , i got 404 error

image

image

image

@ghost
Copy link
Author

ghost commented Apr 7, 2019

when i remove django-debug-toolbar code in urls.py and in settings.py, it's work ok

image

@kwist-sgr
Copy link

In Django 2.2 I use such code:

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [path('__debug__/', include(debug_toolbar.urls))]

@ghost
Copy link
Author

ghost commented May 6, 2019

thank you @kwist-sgr

but it's not work,
i used django 2.2
python 3.7.3

@ghost ghost closed this as completed May 6, 2019
@ryanjkoehler
Copy link

I have the exact same issue. I'm not sure why it was closed.

@symonsoft
Copy link

Same issue

@m3brown
Copy link

m3brown commented Mar 17, 2021

To offer some potential closure on this issue, the problem may be that an earlier pattern is claiming the __debug__/ path. For example, a catch-all pattern like this: url(r"", include(app_urls)),

In this case, the workaround is to put the debug toolbar path earlier in the list. For example:

if settings.DEBUG:
    import debug_toolbar
    urlpatterns.insert(0, path('__debug__/', include(debug_toolbar.urls)))

This issue was closed.
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

No branches or pull requests

4 participants