Example #1
0
 def do_get(self):
     try:
         pp = wi.path_parser(self.get_path())
         self.name = pp.name
         self.action = pp.action
         self.attributes = pp.attributes
         
         action = action_map(self, self.name, self.action).get_action()
         LOG.debug("Action name: " + str(type(action)))
         return action.run()
     except IOError:
         return self.send_error(404,'File Not Found: %s' % self.get_path())
Example #2
0
    def do_post(self):
        pp = wi.path_parser(self.get_path())
        self.name = pp.name
        self.action = pp.action
                
        LOG.debug("Updating %s with new content..." % self.name)

        if self.get_path().endswith("UPLOAD"):
            return self.do_upload()
        elif isWikiWord(self.name):
            return self.do_update()
        else:
            return self.send_error(404,'File Not Found: %s' % self.get_path())