mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 21:11:16 +00:00
Remove unneeded class, wrap line
This commit is contained in:
parent
64fb88cc10
commit
692aa08364
1 changed files with 4 additions and 28 deletions
|
@ -201,33 +201,6 @@ class Quotation(Status):
|
|||
activity_serializer = activitypub.Quotation
|
||||
pure_activity_serializer = activitypub.Note
|
||||
|
||||
#class Progress(Status):
|
||||
# ''' an update of where a user is in a book, using page number or % '''
|
||||
#
|
||||
# progress = models.IntegerField()
|
||||
# mode = models.TextChoices(max_length=3, choices=ProgessMode.choices, default=ProgressMode.PAGE)
|
||||
# book = models.ForeignKey('Edition', on_delete=models.PROTECT)
|
||||
#
|
||||
# @property
|
||||
# def ap_pure_content(self):
|
||||
# ''' indicate the book in question for mastodon (or w/e) users '''
|
||||
# if self.mode == ProgressMode.PAGE:
|
||||
# return 'on page %d of %d in <a href="%s">"%s"</a>' % (
|
||||
# self.progress,
|
||||
# self.book.pages,
|
||||
# self.book.remote_id,
|
||||
# self.book.title,
|
||||
# )
|
||||
# else:
|
||||
# return '%d%% of the way through <a href="%s">"%s"</a>' % (
|
||||
# self.progress,
|
||||
# self.book.remote_id,
|
||||
# self.book.title,
|
||||
# )
|
||||
#
|
||||
# activity_serializer = activitypub.Progress
|
||||
# pure_activity_serializer = activitypub.Note
|
||||
|
||||
class Review(Status):
|
||||
''' a book review '''
|
||||
name = models.CharField(max_length=255, null=True)
|
||||
|
@ -338,7 +311,10 @@ class ProgressUpdate(BookWyrmModel):
|
|||
user = models.ForeignKey('User', on_delete=models.PROTECT)
|
||||
readthrough = models.ForeignKey('ReadThrough', on_delete=models.PROTECT)
|
||||
progress = models.IntegerField()
|
||||
mode = models.CharField(max_length=3, choices=ProgressMode.choices, default=ProgressMode.PAGE)
|
||||
mode = models.CharField(
|
||||
max_length=3,
|
||||
choices=ProgressMode.choices,
|
||||
default=ProgressMode.PAGE)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
''' update user active time '''
|
||||
|
|
Loading…
Reference in a new issue