init()
override this to perform custom initialization at load time
重载这个方法,当加载的时候执行自定义的初始化。
getDescription()
override to return a description string for the snakelet
为snakelet返回描述字符串
requiresSession()
override this to return one of the special SESSION_* values defined in the Snakelet class (for instance return self.SESSION_WANTED), that signify what kind of session is required. Also see the session Ypage-declaration below. The possible values are: SESSION_NOT_NEEDED (no session and session cookie), SESSION_WANTED (use session and session cookie), SESSION_REQUIRED (requires a synchronised session), SESSION_LOGIN_REQUIRED (requires a session with a logged in user), SESSION_DONTCREATE (use existing session, if available, if not: do NOT create a new session). If you use the last one and you do not provide a means of user-authentication (see getAuthMethod below), Snakelets will return a 403-error page when you try to access the page if you are not logged in.
返回在Snakelet 类中定义的特殊 SESSION_* 的值(比如返回self.SESSION_WANTED),见下文的 session 的 Ypage声明。可能存在的值:SESSION_NOT_NEEDED (没有session 和 session cookie),SESSION_WANTED (使用session 和 session cookie), SESSION_REQUIRED (请求同步session),SESSION_LOGIN_REQUIRED(请求已经登陆的用户session),SESSION_DONTCREATE(如果已经存在的session,使用这个session,如果没有也不另外创建新的)。如果您使用最后一个并且您没有提供用户验证的方法或手段(见 getAuthMethod),当您在没有登陆的情况下试图访问页面,Snakelets将返回 403-error 页面错误
getAuthorizedRoles()
override this to return a list or set of privilige names that are allowed to access this snakelet. Default is None (no access control).
返回可以访问snakelet的特权名称列表或者设置列表。默认是None。
getAuthMethod()
override this to return a tuple (method,argument) that defines the authentication method to use for this snakelet. See authorization.
返回一个定义了验证方法的数组。
allowCaching()
override this to return True if the browser is allowed to cache the page, False otherwise. Default is False.
上一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2526 27 28 29 30 31 32 33 34 35 36 37 38 下一页
| 论坛热门帖子: | [lch203] 写得蛮好的linux学习笔记(10-21) [黑马制造] 学习java的30个目标(10-19) [笑傲股林] 做测试半年了,有点迷茫,应该再学些什么提高自己的测试水平和测试能力呢?(10-19) [udp8589] 大家用google的来吱一声? 用百度的~~也来报道下?(10-18) [沂偌掳兆] 本人总结的一些认为C++比较经典的书籍,希望对大家有用(10-18) |
| TAG标签: | 翻译 文档 使用 可以 页面 URL 如果 文件 webapp 一个 |
注册
个人空间
