Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以我有一个金字塔网络应用程序,身份验证工作得很好。如果用户没有登录并尝试访问某个路由,则被重定向到登录页面。但是,现在我有一个要添加的路由,我想确保不需要身份验证。仅对于这条路线,我希望即使用户没有登录也能呈现视图。我该如何完成这个?
@view_config(route_name='home', permission=pyramid.security.NO_PERMISSION_REQUIRED) def open_view(request): # ...
这将禁用视图的授权。