示例#1
0
文件: wiki.py 项目: gaojijun/TNT
 def POST(self, id):
     form = self.form()
     page = tmw.get_page_by_id(int(id))
     if not form.validates():
         return render.edit(page, form)
     tmw.update_page(int(id), form.d.url, form.d.title, form.d.content)
     raise web.seeother('/wiki/%s' % form.d.url)
示例#2
0
文件: wiki.py 项目: gaojijun/TNT
 def GET(self, id):
     page = tmw.get_page_by_id(int(id))
     form = self.form()
     form.fill(page)
     return render.edit(page, form)