1
0
Fork 0

Adds commenting

works on #59
This commit is contained in:
Mouse Reeve 2020-03-21 16:50:49 -07:00
parent 3f96c8cd9d
commit 7862af9729
16 changed files with 222 additions and 31 deletions

View file

@ -46,6 +46,17 @@ class Status(FedireadsModel):
return '%s/%s/%d' % (base_path, model_name, self.id)
class Comment(Status):
''' like a review but without a rating and transient '''
name = models.CharField(max_length=255)
book = models.ForeignKey('Book', on_delete=models.PROTECT)
def save(self, *args, **kwargs):
self.status_type = 'Comment'
self.activity_type = 'Article'
super().save(*args, **kwargs)
class Review(Status):
''' a book review '''
name = models.CharField(max_length=255)