Created
January 17, 2013 19:04
-
-
Save nicksnell/4558608 to your computer and use it in GitHub Desktop.
Tool for django to show all the current URL patterns installed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import urls | |
| def show_urls(urllist, depth=0): | |
| for entry in urllist: | |
| print "-" * depth, entry.regex.pattern | |
| if hasattr(entry, 'url_patterns'): | |
| show_urls(entry.url_patterns, depth + 1) | |
| show_urls(urls.urlpatterns) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment