塔架布线,位置属性是什么?

2024-09-29 22:28:04 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在查看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: 文档https路径内容属性源代码actionforms
1条回答
网友
1楼 · 发布于 2024-09-29 22:28:04

connect()将*args和**kwargs作为参数。由于locations='options'是有效的**kwargs条目,并且位于有效位置,因此它将被接受为有效的传递变量。我没有可用的源代码,所以我不知道connect()将如何处理这个变量。我猜它只是将额外的name=value对附加到创建的URL上

您可以在此处找到更多文档:http://routes.readthedocs.io/en/latest/modules/mapper.html#routes.mapper.Mapper.connect

相关问题 更多 >

    热门问题