Django : How can I see a list of urlpatterns?

interstar picture interstar · Aug 14, 2009 · Viewed 70k times · Source

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 way I can check what's there and why my pattern isn't?

Answer

robert picture robert · Jan 13, 2012

If you want a list of all the urls in your project, first you need to install django-extensions, add it to your settings like this:

INSTALLED_APPS = (
...
'django_extensions',
...
)

And then, run this command in your terminal

./manage.py show_urls

For more information you can check the documentation.