Adds privacy setting to shelves
This commit is contained in:
parent
a5a1af418c
commit
ab0f9230c7
2 changed files with 24 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
from django.db import models
|
||||
|
||||
from bookwyrm import activitypub
|
||||
from .base_model import BookWyrmModel, OrderedCollectionMixin
|
||||
from .base_model import BookWyrmModel, OrderedCollectionMixin, PrivacyLevels
|
||||
|
||||
|
||||
class Shelf(OrderedCollectionMixin, BookWyrmModel):
|
||||
|
@ -11,6 +11,11 @@ class Shelf(OrderedCollectionMixin, BookWyrmModel):
|
|||
identifier = models.CharField(max_length=100)
|
||||
user = models.ForeignKey('User', on_delete=models.PROTECT)
|
||||
editable = models.BooleanField(default=True)
|
||||
privacy = models.CharField(
|
||||
max_length=255,
|
||||
default='public',
|
||||
choices=PrivacyLevels.choices
|
||||
)
|
||||
books = models.ManyToManyField(
|
||||
'Edition',
|
||||
symmetrical=False,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue