Exemplo n.º 1
0
 def wrapper(self, *args, **kwargs):
     counter = Counter.all().get()
     if counter is None:
         counter = Counter()
         counter.put()
     if not users.is_current_user_admin():
         counter.count += 1
         counter.put()
     return handler_method(self, *args, **kwargs)
Exemplo n.º 2
0
 def wrapper(self, *args, **kwargs):
   counter = Counter.all().get()
   if counter is None:
       counter = Counter()
       counter.put()
   if not users.is_current_user_admin():
     counter.count += 1
     counter.put()
   return handler_method(self, *args, **kwargs)
Exemplo n.º 3
0
def getCounter():
  counter = Counter.all().get()
  if counter is None:
    return 0    
  return counter.count