Django-debug-toolbar: 404 도ꡬ λͺ¨μŒμ„ 클릭할 λ•Œ 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€.

에 λ§Œλ“  2014λ…„ 03μ›” 26일  Β·  10μ½”λ©˜νŠΈ  Β·  좜처: jazzband/django-debug-toolbar

μ•ˆλ…•,

μ„€λͺ…μ„œμ— μ„€λͺ…λœ λͺ…μ‹œμ  섀정을 μ‚¬μš©ν•˜μ—¬ DDTλ₯Ό μ„€μΉ˜ν–ˆμŠ΅λ‹ˆλ‹€. 도ꡬ λͺ¨μŒμ΄ μ˜¬λ°”λ₯΄κ²Œ ν‘œμ‹œλ˜μ§€λ§Œ νŒ¨λ„ 쀑 ν•˜λ‚˜λ₯Ό ν΄λ¦­ν•˜λ©΄ 항상 404 Not Found 였λ₯˜κ°€ λ°œμƒν•©λ‹ˆλ‹€.

[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

μ €λŠ” Python 2.7.6을 μ‹€ν–‰ 쀑이며 Mezzanine도 μ‚¬μš© μ€‘μž…λ‹ˆλ‹€. λ‹€μŒμ€ ν•΄λ‹Ή λ²„μ „μž…λ‹ˆλ‹€.

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

λ‚˜λŠ” 이미 이 문제λ₯Ό κ½€ μ˜€λž«λ™μ•ˆ μ°Ύμ•˜μ§€λ§Œ 해결책을 찾지 λͺ»ν•œ 것 κ°™μŠ΅λ‹ˆλ‹€. λ§Žμ€ 도움을 μ£Όμ…”μ„œ κ°μ‚¬ν•©λ‹ˆλ‹€!

루이슀

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

이 μž‘μ—…μ„ μˆ˜ν–‰:

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

λͺ¨λ“  10 λŒ“κΈ€

μ•ˆλ…•,

λ§ˆμΉ¨λ‚΄ λ¬Έμ œκ°€ 무엇인지 μ•Œμ•„λƒˆμŠ΅λ‹ˆλ‹€. Mezzanine catch-all URL 뒀에 λͺ…μ‹œμ  μ„€μ • URL ꡬ성(http://django-debug-toolbar.readthedocs.org/en/latest/installation.html)을 μΆ”κ°€ν•˜κ³  μžˆμ—ˆμŠ΅λ‹ˆλ‹€...

ν•΄λ‹Ή URL νŒ¨ν„΄ μ•žμ— λ°°μΉ˜ν•œ ν›„ μ œλŒ€λ‘œ μž‘λ™ν•˜κΈ° μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€.

감사 ν•΄μš”,
루이슀

이해가 μ•ˆλ˜λŠ”λ° μ–΄λ–»κ²Œ ν•΄κ²°ν•˜μ…¨λ‚˜μš”?

CMS의 "catch all" URL νŒ¨ν„΄ μ•žμ— 디버그 도ꡬ λͺ¨μŒμ˜ URL을 λ°°μΉ˜ν•˜μ—¬ CMSκ°€ μ•„λ‹Œ 디버그 도ꡬ λͺ¨μŒμ—μ„œ μ²˜λ¦¬λ˜λ„λ‘ ν•©λ‹ˆλ‹€.

Wagtailκ³Ό λ™μΌν•œ λ¬Έμ œκ°€ μžˆμ§€λ§Œ ν•΄κ²° 방법을 λͺ¨λ₯΄κ² μŠ΅λ‹ˆλ‹€.

λͺ…μ‹œμ  섀정을 μ‚¬μš©ν•˜κ³ (μžμ„Έν•œ λ‚΄μš©μ€ 디버그 도ꡬ λͺ¨μŒ μ„€λͺ…μ„œ μ°Έμ‘°)

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

~ 전에

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

κ·€ν•˜μ˜ urlpatterns .

if debug ???

μ£„μ†‘ν•˜μ§€λ§Œ μ–΄λ–»κ²Œ 더 λ„μ™€λ“œλ¦΄ 수 μžˆμ„μ§€ λͺ¨λ₯΄κ² μŠ΅λ‹ˆλ‹€. μ–΄λ–€ μ‹œμ μ—μ„œ μ΄λŸ¬ν•œ 것듀이 μ–΄λ–»κ²Œ μž‘λ™ν•˜λŠ”μ§€ 이해해야 ν•©λ‹ˆλ‹€.

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)),
    ]

Wagtail URL μ•žμ— λ†“μ•˜μŠ΅λ‹ˆκΉŒ?

이 μž‘μ—…μ„ μˆ˜ν–‰:

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

였, 이것은 당신보닀 νš¨κ³Όκ°€ μžˆμ„ 수 μžˆμŠ΅λ‹ˆλ‹€. λ‚˜λŠ” 그것을 ν…ŒμŠ€νŠΈν•˜κ³  λ‹Ήμ‹ λ“€μ—κ²Œ 말할 κ²ƒμž…λ‹ˆλ‹€.
그리고 λ„€, URL을 이 μˆœμ„œλŒ€λ‘œ λ„£μœΌλ©΄ λ¬Έμ œκ°€ ν•΄κ²°λ©λ‹ˆλ‹€.

κ°μ‚¬ν•©λ‹ˆλ‹€!

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰