Closed iakovleva closed 9 years ago
In the suggested snippet the user avatar is displayed. I made comment list without avatar as our users don't have it. What other functionality needs to be added to comments?
Probably, ability to reply to comment would be next most useful feature for comments. The reply comment should be indented a little bit more than it's parent. To implement this you have to add recursive parent field for the comment model, just like in Event model: parent_comment = models.ForeignKey('self', null=True, blank=True)
.
For avatars you could use Gravatar - its a service which associates avatar image with an email address. We have user emails, so we can use this Gravatar API: http://en.gravatar.com/site/implement/images/python/. Default avatar is not provided by Gravatar. E.g. for albertas.gimbutas@mii.vu.lt email, the avatar link is http://www.gravatar.com/avatar/7942d2b4692b34c41890a6eb2fbeb819
I will merge this branch when test will be added. I'll create new tasks for the two previous suggestions.
I added a test though I'm not sure it is correct. Among other things I can't find out how to check if comment was saved into db.
Implements #1