예제 #1
0
 def update_review(self, review):
     try:
         r = int(review)
         if choice_name(settings.REVIEW_CHOICES, r) != "unknown":
             self.review = r
             self.save()
             return True
     except ValueError:
         pass
     return False
예제 #2
0
 def tokenizer_name(self):
     return choice_name(settings.TOKENIZER_CHOICES, self.tokenizer)
예제 #3
0
 def provider_name(self):
     return choice_name(settings.PROVIDER_CHOICES, self.provider)
예제 #4
0
 def review_name(self):
     return choice_name(settings.REVIEW_CHOICES, self.review)