Sometimes, we want tto see a list of urlpatterns with Python Django.
In this article, we’ll look at how to see a list of urlpatterns with Python Django.
How to see a list of urlpatterns with Python Django?
To see a list of urlpatterns with Python Django, we can install the django-extensions
package.
To install it, we run
pip install django-extensions
Then we add it to INSTALLED_APPS
in settings.py with
INSTALLED_APPS = (
#...
'django_extensions',
#...
)
Then we run
python manage.py show_urls
to show a list of all the URLs on the screen.
Conclusion
To see a list of urlpatterns with Python Django, we can install the django-extensions
package.