- Route 是用 Python 重新实现的 Rails routes system;
- 它被用来做将 URL 映射为 App 的 action,以及为 application 的 action 产生 URL。
Exmaple
1 |
# Setup a mapper |
map.connect
- 定义映射规则
map.match
- 获取映射结果
map.resource
- resource(member_name, collection_name, **kwargs)
参数
- controller
- collection
- new
- path_prefix
- name_prefix
- parent_resource
近期评论