web2pyでwiki化する方法
はじめに
プラグインを使わなくてもできるのでメモ
手順
- コントローラー(default.pyなど)に以下を追記する。
# This goes in the controller which will present # the wiki interface (usually default.py) def wiki(): return auth.wiki()
- <コントローラー>/wiki.html(例:default/wiki.html)に以下を追記する。
{{extend 'layout.html'}} <!-- Note that the response item named content contains the helper returned by the auth.wiki() call and you can choose where to place it within your view layout --> {{=content}}
- 以下のURLにアクセスする。
http://<web2pyアプリのURL>/<コントローラー>/wiki
参考
- Wikifying web2py apps
- http://www.web2pyslices.com/slice/show/1565/wikifying-web2py-apps