Beispiel #1
0
    def post_process_request(self, req, template, data, content_type):
        if template is not None:
            if req.method == 'GET' and req.path_info.startswith('/wiki/'):
                if req.args.get('action') == 'edit' and \
                        req.args.get('template') and 'tags' not in req.args:
                    self._post_process_request_edit(req)
                if req.args.get('action') == 'history' and \
                        data and 'history' in data:
                    self._post_process_request_history(req, data)
            elif req.method == 'POST' and \
                    req.path_info.startswith('/wiki/') and \
                    'save' in req.args:
                requests.reset()

            # Insert the tags information and controls into
            # the wiki page
            if data and 'page' in data:
                if template == 'wiki_view.html' and \
                        'TAGS_VIEW' in req.perm(data['page'].resource):
                    self._post_process_request_wiki_view(req)
                elif template == 'wiki_edit.html' and \
                        'TAGS_MODIFY' in req.perm(data['page'].resource):
                    self._post_process_request_wiki_edit(req)
                elif template == 'history_view.html' and \
                        'TAGS_VIEW' in req.perm(data['page'].resource):
                    self._post_process_request_wiki_history(req)

        return template, data, content_type
Beispiel #2
0
 def post_process_request(self, req, template, data, content_type):
     if req.method == 'GET' and req.path_info.startswith('/wiki/'):
         if req.args.get('action') == 'edit' and \
                 req.args.get('template') and 'tags' not in req.args:
             self._post_process_request_edit(req)
         if req.args.get('action') == 'history' and \
                 data and 'history' in data:
             self._post_process_request_history(req, data)
     if req.method == 'POST' and req.path_info.startswith('/wiki/') and \
             'save' in req.args:
         requests.reset()
     return (template, data, content_type)
Beispiel #3
0
 def post_process_request(self, req, template, data, content_type):
     if template is not None:
         if req.method == 'GET' and req.path_info.startswith('/wiki/'):
             if req.args.get('action') == 'edit' and \
                     req.args.get('template') and 'tags' not in req.args:
                 self._post_process_request_edit(req)
             if req.args.get('action') == 'history' and \
                     data and 'history' in data:
                 self._post_process_request_history(req, data)
         elif req.method == 'POST' and \
                 req.path_info.startswith('/wiki/') and \
                 'save' in req.args:
             requests.reset()
     return template, data, content_type
Beispiel #4
0
 def _redirect_listener(self, req, url, permanent):
     requests.reset()
Beispiel #5
0
 def _redirect_listener(self, req, url, permanent):
     requests.reset()