Example #1
0
 def set_iter(self, data):
     if pythonver >= 3:
         for page in data['query']['pages'].values():
             if page['title'] == self.page.name:
                 self._iter = iter(page.get(self.list_name, ()))
                 return
     else:
         for page in data['query']['pages'].itervalues():
             if page['title'] == self.page.name:
                 self._iter = iter(page.get(self.list_name, ()))
                 return
     raise StopIteration
Example #2
0
 def set_iter(self, data):
     if pythonver >= 3:
         for page in data['query']['pages'].values():
             if page['title'] == self.page.name:
                 self._iter = iter(page.get(self.list_name, ()))
                 return
     else:
         for page in data['query']['pages'].itervalues():
             if page['title'] == self.page.name:
                 self._iter = iter(page.get(self.list_name, ()))
                 return
     raise StopIteration
Example #3
0
 def get(self, key):
     if key and len(key):
         url = page.get(key)
         if url:
             return self.redirect(url, permanent=True)
     self.response.set_status(404)