mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-18 22:26:34 +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"),
|
through_fields=("user_subject", "user_object"),
|
||||||
related_name="blocked_by",
|
related_name="blocked_by",
|
||||||
)
|
)
|
||||||
|
saved_lists = models.ManyToManyField(
|
||||||
|
"List", symmetrical=False, related_name="saved_lists"
|
||||||
|
)
|
||||||
favorites = models.ManyToManyField(
|
favorites = models.ManyToManyField(
|
||||||
"Status",
|
"Status",
|
||||||
symmetrical=False,
|
symmetrical=False,
|
||||||
|
|
Loading…
Reference in a new issue