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 when clicking on toolbar #568

Closed
lfigueira opened this issue Mar 25, 2014 · 10 comments
Closed

404 Error when clicking on toolbar #568

lfigueira opened this issue Mar 25, 2014 · 10 comments

Comments

@lfigueira
Copy link

Hi,

I've installed DDT using the explicit setup described in the documentation. The toolbar appears correctly, but when I click on any of the panels, I always get 404 Not Found errors:

[25/Mar/2014 23:31:44] "GET /__debug__/render_panel/?store_id=0020c69907dd48d9b76ff11d9ff46d0c&panel_id=TimerPanel HTTP/1.1" 404 1673
[25/Mar/2014 23:31:53] "GET /__debug__/render_panel/?store_id=0020c69907dd48d9b76ff11d9ff46d0c&panel_id=LoggingPanel HTTP/1.1" 404 1675

I'm running Python 2.7.6, and also using Mezzanine - these are their versions:

Django==1.6.1
Mezzanine==3.0.7
django-debug-toolbar==1.0.1

I've already searched for this issue for quite a while, but can't seem to find a solution. Many thanks for your help!

Luis

@lfigueira
Copy link
Author

Hi,

I finally figured out what the problem was - I was adding the explicit setup URL configuration (http://django-debug-toolbar.readthedocs.org/en/latest/installation.html) after the Mezzanine catch-all URL...

After placing it before that URL pattern it started working fine.

Thanks,
Luis

@SalahAdDin
Copy link

I don't understand you, how did you solve?

@aaugustin
Copy link
Contributor

By putting the debug toolbar's URLs before the CMS' "catch all" URL pattern, so they're handled by the debug toolbar and not the CMS.

@SalahAdDin
Copy link

I have the same problem with Wagtail but i don't know how solve it.

@aaugustin
Copy link
Contributor

Use the explicit setup (see the debug toolbar's documentation for details) and put

url(r'^__debug__/', include(debug_toolbar.urls)),

before

url(r'', include(wagtail_urls)),

in your urlpatterns.

@SalahAdDin
Copy link

Without if debug???

@aaugustin
Copy link
Contributor

I'm sorry but I don't know how I can help you further. At some point you need to understand how these things work.

@SalahAdDin
Copy link

from django.conf import settings
from django.conf.urls import include, url

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

Have i put it before Wagtail urls.

@aaugustin
Copy link
Contributor

Do this:

    urlpatterns = [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns

@SalahAdDin
Copy link

SalahAdDin commented Oct 25, 2016

Oh, this could be works, than you, i'll test it and then i say you guys.
And yes, put the urls in these order solve my problem.

Thank you!

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

3 participants