Signout
今度はOpenIDからのSignoutを実装する。
Helper lib/helpers.py
from routes import url_for
clock.py
- helper取り込み
from myclock.lib import helpers as h
テンプレート修正 now.html
<%inherit file="/base/index.html"/> ${c.content} <br/> <a href="${h.url_for(action = 'signout')}">Signout</a>
development.iniにおいて
authkit.cookie.signoutpath = /clock/signout
を定義しているので、コントローラのsignout()では特に何もしなくてもOpenIDからのSignout処理が実行される。Signout後に、所望のページ(ここではnow)にredirectすればよい。