Exemple #1
0
 def GET_wiki_revise(self, page, message=None, **kw):
     page = page[0]
     previous = kw.get('previous', page._get('revision'))
     content = kw.get('content', page.content)
     if not message and page.name in page_descriptions:
         message = page_descriptions[page.name]
     return WikiEdit(content, previous, alert=message).render()
Exemple #2
0
 def GET_wiki_revise(self, wp, page, message=None, **kw):
     wp = wp[0]
     previous = kw.get('previous', wp._get('revision'))
     content = kw.get('content', wp.content)
     if not message and wp.name in page_descriptions:
         message = page_descriptions[wp.name]
     return WikiEdit(content, previous, alert=message, page=wp.name,
                     may_revise=True).render()
Exemple #3
0
 def GET_wiki_revise(self, wp, page, message=None, **kw):
     wp = wp[0]
     VNotInTimeout().run(action_name="wikirevise", details_text="revise",
         target=wp)
     error = c.errors.get(('MAY_NOT_REVISE', 'page'))
     if error:
         self.handle_error(403, **(error.msg_params or {}))
     
     previous = kw.get('previous', wp._get('revision'))
     content = kw.get('content', wp.content)
     if not message and wp.name in page_descriptions:
         message = page_descriptions[wp.name]
     return WikiEdit(content, previous, alert=message, page=wp.name,
                     may_revise=True).render()