Ejemplo n.º 1
0
 def get_rating_for_user(self):
     try:
         return Rating.objects.get(user=threadlocals.get_current_user(), version=self).score
     except:
         return 0
Ejemplo n.º 2
0
 def user_is_maintainer(self):
     return threadlocals.get_current_user().pk == self.maintainer.pk or threadlocals.get_current_user().is_staff