Django : How can I see a list of urlpatterns?

后端 未结 16 1741
有刺的猬
有刺的猬 2020-11-29 19:36

How can I see the current urlpatterns that \"reverse\" is looking in?

I\'m calling reverse in a view with an argument that I think should work, but doesn\'t. Any wa

16条回答
  •  半阙折子戏
    2020-11-29 19:53

    Simply type in a url you know does not exist and the server will return an error message with a list of url patterns.

    For example, if you're running a site at http://localhost:8000/something

    Type in

    http://localhost:8000/something/blahNonsense, and your server will return the url search list and display it in the browser

提交回复
热议问题