Adds saved lists many to many field

This commit is contained in:
Mouse Reeve 2021-08-23 11:19:15 -07:00
parent 7345705b08
commit eca0ff371c
2 changed files with 23 additions and 0 deletions

View 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"
),
),
]

View file

@ -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,