Adds list creation form

This commit is contained in:
Mouse Reeve
2021-01-31 08:08:52 -08:00
parent 91483b56f5
commit 69c2b192a4
6 changed files with 104 additions and 12 deletions

View File

@ -2,6 +2,7 @@
from django.db import models
from bookwyrm import activitypub
from bookwyrm.settings import DOMAIN
from .base_model import ActivitypubMixin, BookWyrmModel
from .base_model import OrderedCollectionMixin
from . import fields
@ -35,6 +36,11 @@ class List(OrderedCollectionMixin, BookWyrmModel):
through='ListItem',
through_fields=('book_list', 'book'),
)
def get_remote_id(self):
''' don't want the user to be in there in this case '''
return 'https://%s/list/%d' % (DOMAIN, self.id)
@property
def collection_queryset(self):
''' list of books for this shelf, overrides OrderedCollectionMixin '''