在django有什么类似“耙子路线”的东西? [英] Is there something similar to 'rake routes' in django?

查看:151
本文介绍了在django有什么类似“耙子路线”的东西?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在rails中,可以使用rake显示活动路线( http://guides.rubyonrails.org/ routing.html ):

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"}

是否有类似的工具/命令django显示例如URL模式,模式名称(如果有)和视图中的相关函数?

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?

推荐答案

找到 https://github.com/django-extensions/django-extensions

$ ./manage.py show_urls

这篇关于在django有什么类似“耙子路线”的东西?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆