diff --git a/wagtail/users/migrations/0011_userprofile_dismissibles.py b/wagtail/users/migrations/0011_userprofile_dismissibles.py new file mode 100644 index 0000000000..5bb4886fdc --- /dev/null +++ b/wagtail/users/migrations/0011_userprofile_dismissibles.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.5 on 2022-10-06 15:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("wagtailusers", "0010_userprofile_updated_comments_notifications"), + ] + + operations = [ + migrations.AddField( + model_name="userprofile", + name="dismissibles", + field=models.JSONField(blank=True, default=dict), + ), + ] diff --git a/wagtail/users/models.py b/wagtail/users/models.py index 173a85d3a2..004162dfc3 100644 --- a/wagtail/users/models.py +++ b/wagtail/users/models.py @@ -70,6 +70,8 @@ class UserProfile(models.Model): blank=True, ) + dismissibles = models.JSONField(default=dict, blank=True) + @classmethod def get_for_user(cls, user): return cls.objects.get_or_create(user=user)[0]