示例#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)
示例#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)
示例#3
0
def getCounter():
  counter = Counter.all().get()
  if counter is None:
    return 0    
  return counter.count