ぼくのかんがえたさいきょうの

archiving something about I'm interested in; computer etc.

web2pyでwiki化する方法

はじめに

プラグインを使わなくてもできるのでメモ

手順

  1. コントローラー(default.pyなど)に以下を追記する。
# This goes in the controller which will present
# the wiki interface (usually default.py)
def wiki():
    return auth.wiki()
  1. <コントローラー>/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}}
  1. 以下のURLにアクセスする。
http://<web2pyアプリのURL>/<コントローラー>/wiki