Esempio n. 1
0
File: main.py Progetto: hassy/Mowars
 def get(self):
     """Returns the bottom 10 taches template"""
     taches = get_bottom_taches()
     template_values = {
         'pagetitle': 'Bottom 10 Taches',
         'taches': taches,
         'ranking_type': 'Bottom',
     }
     self.render_template(template_values)
Esempio n. 2
0
 def get(self):
     """Returns the bottom 10 taches template"""
     bot10 = memcache.get("bot10")
     if bot10 is not None:
         self.response.out.write(bot10)
     else:
         taches = get_bottom_taches()
         template_values = {
             'page-title': 'Bottom 10 Taches',
             'taches': taches,
             'ranking_type': 'Bottom',
         }
         rendered = self.render_template_memcache(template_values)
         if not memcache.add("bot10", rendered, 240):
             logging.error("Memcache set failed.")
         self.response.out.write(rendered)