diff options
-rw-r--r-- | app/lttr/admin.py | 3 | ||||
-rw-r--r-- | app/lttr/migrations/0025_postcardsubscriber_postcard_sent.py | 18 | ||||
-rw-r--r-- | app/lttr/models.py | 1 |
3 files changed, 21 insertions, 1 deletions
diff --git a/app/lttr/admin.py b/app/lttr/admin.py index 8acce33..0a38d20 100644 --- a/app/lttr/admin.py +++ b/app/lttr/admin.py @@ -99,7 +99,8 @@ class NewsletterMailingAdmin(admin.ModelAdmin): @admin.register(PostcardSubscriber) class PostcardSubscriberAdmin(admin.ModelAdmin): - list_display = ('name', 'address', 'date_created', 'postcards_sent') + list_display = ('name', 'address', 'date_created', 'postcard_sent') + list_filter = ('postcard_sent',) class Media: js = ('next-prev-links.js',) diff --git a/app/lttr/migrations/0025_postcardsubscriber_postcard_sent.py b/app/lttr/migrations/0025_postcardsubscriber_postcard_sent.py new file mode 100644 index 0000000..7c876fd --- /dev/null +++ b/app/lttr/migrations/0025_postcardsubscriber_postcard_sent.py @@ -0,0 +1,18 @@ +# Generated by Django 5.0.4 on 2024-12-08 11:21 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('lttr', '0024_postcardsubscriber_postcards_sent'), + ] + + operations = [ + migrations.AddField( + model_name='postcardsubscriber', + name='postcard_sent', + field=models.BooleanField(default=False), + ), + ] diff --git a/app/lttr/models.py b/app/lttr/models.py index 0a9fdc7..5519ff6 100644 --- a/app/lttr/models.py +++ b/app/lttr/models.py @@ -480,6 +480,7 @@ class PostcardSubscriber(models.Model): address = models.TextField() name = models.CharField(max_length=120) postcards_sent = models.PositiveIntegerField(default=0) + postcard_sent = models.BooleanField(default=False) def __str__(self): return self.name |