Welcome, guest | Sign In | My Account | Store | Cart
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)

History

  • revision 5 (12 years ago)
  • previous revisions are not available