Adds reading status field to book statuses

This commit is contained in:
Mouse Reeve
2021-08-16 13:21:16 -07:00
parent 1e1bf83201
commit 2d20fa4146
2 changed files with 67 additions and 0 deletions

View File

@ -235,6 +235,11 @@ class GeneratedNote(Status):
pure_type = "Note"
ReadingStatusChoices = models.TextChoices(
"ReadingStatusChoices", ["to-read", "reading", "read"]
)
class BookStatus(Status):
"""Shared fields for comments, quotes, reviews"""
@ -243,7 +248,13 @@ class BookStatus(Status):
)
pure_type = "Note"
reading_status = fields.CharField(
max_length=255, choices=ReadingStatusChoices.choices, null=True, blank=True
)
class Meta:
"""not a real model, sorry"""
abstract = True