Merge pull request #800 from SavinaRoja/716-book-multiple-shelves

716 books can be on multiple shelves, but only on one shelf for reading status
This commit is contained in:
Mouse Reeve
2021-03-29 12:59:49 -07:00
committed by GitHub
6 changed files with 102 additions and 41 deletions

View File

@ -11,6 +11,12 @@ from . import fields
class Shelf(OrderedCollectionMixin, BookWyrmModel):
""" a list of books owned by a user """
TO_READ = "to-read"
READING = "reading"
READ_FINISHED = "read"
READ_STATUS_IDENTIFIERS = (TO_READ, READING, READ_FINISHED)
name = fields.CharField(max_length=100)
identifier = models.CharField(max_length=100)
user = fields.ForeignKey(