Esempio n. 1
0
 def contributions(self, request):
     res = {}
     for date_, contribution in UserContributions.get_by_user(self.name).iteritems():
         timestamp = time.mktime(datetime.strptime(date_, "%Y-%m-%d").timetuple())
         score = contribution[0]
         res.setdefault(timestamp, score)
     return res
Esempio n. 2
0
 def contributions(self, request):
     res = {}
     for date_, contribution in UserContributions.get_by_user(
             self.name).iteritems():
         timestamp = time.mktime(
             datetime.strptime(date_, '%Y-%m-%d').timetuple())
         score = contribution[0]
         res.setdefault(timestamp, score)
     return res
Esempio n. 3
0
 def contributions(self, request):
     res = {}
     days = int(request.get_form_var('days', 31))
     for date_, contribution in UserContributions.get_by_user(
             self.user.name, days=days).iteritems():
         timestamp = time.mktime(
             datetime.strptime(date_, '%Y-%m-%d').timetuple())
         score = contribution[0]
         res.setdefault(timestamp, score)
     return res
Esempio n. 4
0
 def contributions(self, request):
     res = {}
     days = int(request.get_form_var('days', 31))
     for date_, contribution in UserContributions.get_by_user(
             self.user.name, days=days).iteritems():
         timestamp = time.mktime(
             datetime.strptime(date_, '%Y-%m-%d').timetuple())
         score = contribution[0]
         res.setdefault(timestamp, score)
     return res