Adds quotes
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
''' bring all the models into the app namespace '''
|
||||
from .book import Connector, Book, Work, Edition, Author
|
||||
from .shelf import Shelf, ShelfBook
|
||||
from .status import Status, Review, Comment, Favorite, Boost, Tag, Notification
|
||||
from .status import Status, Review, Comment, Quotation
|
||||
from .status import Favorite, Boost, Tag, Notification
|
||||
from .user import User, UserFollows, UserFollowRequest, UserBlocks
|
||||
from .user import FederatedServer
|
||||
|
@ -56,6 +56,17 @@ class Comment(Status):
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class Quotation(Status):
|
||||
''' like a review but without a rating and transient '''
|
||||
book = models.ForeignKey('Edition', on_delete=models.PROTECT)
|
||||
quote = models.TextField()
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
self.status_type = 'Quotation'
|
||||
self.activity_type = 'Note'
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class Review(Status):
|
||||
''' a book review '''
|
||||
name = models.CharField(max_length=255, null=True)
|
||||
|
Reference in New Issue
Block a user