mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-18 14:16:45 +00:00
Adds saved lists many to many field
This commit is contained in:
parent
7345705b08
commit
eca0ff371c
2 changed files with 23 additions and 0 deletions
20
bookwyrm/migrations/0085_user_saved_lists.py
Normal file
20
bookwyrm/migrations/0085_user_saved_lists.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Generated by Django 3.2.4 on 2021-08-23 18:05
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("bookwyrm", "0084_auto_20210817_1916"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name="user",
|
||||
name="saved_lists",
|
||||
field=models.ManyToManyField(
|
||||
related_name="saved_lists", to="bookwyrm.List"
|
||||
),
|
||||
),
|
||||
]
|
|
@ -104,6 +104,9 @@ class User(OrderedCollectionPageMixin, AbstractUser):
|
|||
through_fields=("user_subject", "user_object"),
|
||||
related_name="blocked_by",
|
||||
)
|
||||
saved_lists = models.ManyToManyField(
|
||||
"List", symmetrical=False, related_name="saved_lists"
|
||||
)
|
||||
favorites = models.ManyToManyField(
|
||||
"Status",
|
||||
symmetrical=False,
|
||||
|
|
Loading…
Reference in a new issue