Ejemplo n.º 1
0
 def POST(self, page=None):
     data = self.page_form()
     if data.validates():
         d = data.d
         cur = model.get_page(page)
         print d
         if cur:
             model.update_page(page, d.title, d.position, d.pagesize, int(d.draft))
         else:
             model.add_page(d.name, d.title, int(d.position), int(d.pagesize), int(d.draft))
     raise web.seeother('/page')
Ejemplo n.º 2
0
def make_page(page, title, position):
    model.add_page(page,title, position, draft=0)