Exemple #1
0
 def _redirect(self, action_result, code=303):
     if isinstance(action_result, list):
         uri_params = []
         for arg in action_result:
             if arg is None:
                 arg = ''
             uri_params.append(urllib2.quote(arg.encode('utf-8'), safe=""))
         raise internal_redirect(self.uri_fmt % tuple(uri_params))
     elif action_result is not None and action_result != self.ident:
         uri_params = list(self.model_args[:-1])
         uri_params += [urllib2.quote(action_result.encode('utf-8'),
                        safe="")]
         raise internal_redirect(self.uri_fmt % tuple(uri_params))
Exemple #2
0
 def _render_element(self, ident):
     self._redirect(ident)
     uri_params = []
     for arg in self.model_args:
         if arg is None:
             arg = ''
         uri_params.append(urllib2.quote(arg.encode('utf-8'), safe=""))
     raise internal_redirect(self.uri_fmt % tuple(uri_params))
Exemple #3
0
 def _render_element(self, ident):
     self._redirect(ident)
     uri_params = []
     for arg in self.model_args:
         if arg is None:
             arg = ""
         uri_params.append(urllib2.quote(arg.encode("utf-8"), safe=""))
     raise internal_redirect(self.uri_fmt % tuple(uri_params))
Exemple #4
0
 def get(self):
     self.lookup()
     internal_uri = self.info.replace('plugins/kimchi', '')
     raise internal_redirect(internal_uri)
Exemple #5
0
 def get(self):
     self.lookup()
     internal_uri = self.info.replace('plugins/kimchi', '')
     raise internal_redirect(internal_uri)
Exemple #6
0
 def data(self):
     internal_uri = self.info.replace('plugins/kimchi', '')
     raise internal_redirect(internal_uri)
Exemple #7
0
 def get(self):
     self.lookup()
     internal_uri = self.info['uri'].replace('plugins/gingerbase', '')
     raise internal_redirect(internal_uri)
Exemple #8
0
 def data(self):
     internal_uri = self.info.replace('plugins/kimchi', '')
     raise internal_redirect(internal_uri)
Exemple #9
0
 def get(self):
     self.lookup()
     internal_uri = self.info['uri'].replace('plugins/gingerbase', '')
     raise internal_redirect(internal_uri)
Exemple #10
0
 def get(self):
     self.lookup()
     raise internal_redirect(self.info['uri'])
Exemple #11
0
 def get(self):
     self.lookup()
     raise internal_redirect(self.info)