SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit cc975c9b authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

One more

parent 639e6a04
No related branches found
No related tags found
No related merge requests found
......@@ -84,8 +84,11 @@ class Comment(TimeStampedModel):
)
def __str__(self):
return ('by ' + self.author.user.first_name + ' ' + self.author.user.last_name +
' on ' + self.date_submitted.strftime('%Y-%m-%d') + ', ' + self.comment_text[:30])
text = "Anonymous"
if not self.anonymous:
text = self.author.user.first_name + ' ' + self.author.user.last_name
return (text + ' on '
+ self.date_submitted.strftime('%Y-%m-%d') + ', ' + self.comment_text[:30])
@property
def title(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment