我正在查看reddit源代码,并遇到了如下路径:
mc('/prefs/:location', controller='forms', action='prefs', location='options')
在此处搜索文档时,我找不到任何与location
属性相关的内容:
https://thejimmyg.github.io/pylonsbook/en/1.0/urls-routing-and-dispatch.html
location='options'
应该为这条路线做什么
Tags:
connect()将*args和**kwargs作为参数。由于
locations='options'
是有效的**kwargs条目,并且位于有效位置,因此它将被接受为有效的传递变量。我没有可用的源代码,所以我不知道connect()将如何处理这个变量。我猜它只是将额外的name=value对附加到创建的URL上您可以在此处找到更多文档:http://routes.readthedocs.io/en/latest/modules/mapper.html#routes.mapper.Mapper.connect
相关问题 更多 >
编程相关推荐