Moves activitypub mixin to its own file

This commit is contained in:
Mouse Reeve
2021-02-04 10:47:03 -08:00
parent ae0034e678
commit dfb5c396b0
13 changed files with 291 additions and 280 deletions

View File

@ -7,8 +7,8 @@ from model_utils.managers import InheritanceManager
from bookwyrm import activitypub
from bookwyrm.settings import DOMAIN
from .activitypub_mixin import ActivitypubMixin, OrderedCollectionPageMixin
from .base_model import BookWyrmModel
from .base_model import ActivitypubMixin, OrderedCollectionPageMixin
from . import fields
class BookDataModel(ActivitypubMixin, BookWyrmModel):
@ -74,6 +74,7 @@ class Book(BookDataModel):
@property
def latest_readthrough(self):
''' most recent readthrough activity '''
return self.readthrough_set.order_by('-updated_date').first()
@property