@property
def gravatar(self):
- return md5(self.email).hexdigest()
-
+ return md5(self.email.lower()).hexdigest()
+
def save(self, *args, **kwargs):
if self.reputation < 0:
self.reputation = 0
def can_delete_comment(self, comment):
return self == comment.author or self.reputation >= int(settings.REP_TO_DELETE_COMMENTS)
+ @true_if_is_super_or_staff
+ def can_convert_comment_to_answer(self, comment):
+ return self == comment.author or self.reputation >= int(settings.REP_TO_COMMENTS_TO_ANSWERS)
+
def can_convert_to_comment(self, answer):
return (not answer.marked) and (self.is_superuser or self.is_staff or answer.author == self or self.reputation >= int
(settings.REP_TO_CONVERT_TO_COMMENT))
+
+ def can_convert_to_question(self, answer):
+ return (not answer.marked) and (self.is_superuser or self.is_staff or answer.author == self or self.reputation >= int
+ (settings.REP_TO_CONVERT_TO_QUESTION))
@true_if_is_super_or_staff
def can_accept_answer(self, answer):