Exemple #1
0
 def post(self):
     if users.is_current_user_admin():
         models.save_log(self.request)
         memcache.delete('main_page')
         self.redirect('/admin/edit_log')
     else:
         self.redirect('/')
Exemple #2
0
 def post(self, mode):
     if users.is_current_user_admin():
         if mode == "log":
             models.save_log(self.request,'new')
             models.save_increment(self.request)
             memcache.delete('main_page')
         if mode == "stuff":
             models.save_stuff(self.request,'new')
             memcache.delete('stuff_page')
         if mode == "ttext":
             ttext = models.save_tt(self.request,'new')
         self.redirect('/admin')
     else:
         self.redirect('/')