Is there something similar to 'rake routes' in django?

miku picture miku · Jan 19, 2010 · Viewed 16k times · Source

In rails, on can show the active routes with rake (http://guides.rubyonrails.org/routing.html):

$ rake routes
          users GET  /users          {:controller=>"users", :action=>"index"}
formatted_users GET  /users.:format  {:controller=>"users", :action=>"index"}
                POST /users          {:controller=>"users", :action=>"create"}
                POST /users.:format  {:controller=>"users", :action=>"create"}

Is there a similar tool/command for django showing the e.g. the URL pattern, the name of the pattern (if any) and the associated function in the views?

Answer

miku picture miku · Jun 3, 2010

Have found https://github.com/django-extensions/django-extensions:

$ ./manage.py show_urls