Remove unneeded class, wrap line

This commit is contained in:
Joel Bradshaw 2020-11-25 23:11:30 -08:00
parent 64fb88cc10
commit 692aa08364

View file

@ -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 '''