diff options
Diffstat (limited to 'app/lttr/admin.py')
-rw-r--r-- | app/lttr/admin.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/app/lttr/admin.py b/app/lttr/admin.py index 570780c..ad35959 100644 --- a/app/lttr/admin.py +++ b/app/lttr/admin.py @@ -2,7 +2,14 @@ from django.contrib import admin from utils.widgets import AdminImageWidget, LGEntryForm -from .models import NewsletterMailing, OldNewsletterMailing, Subscriber, Newsletter, MailingStatus, PostcardSubscriber +from .models import ( + NewsletterMailing, + OldNewsletterMailing, + Subscriber, + Newsletter, + MailingStatus, + PostcardSubscriber +) @admin.register(Subscriber) class SubscriberAdmin(admin.ModelAdmin): @@ -13,10 +20,12 @@ class SubscriberAdmin(admin.ModelAdmin): class Media: js = ('next-prev-links.js',) + @admin.register(Newsletter) class NewsletterAdmin(admin.ModelAdmin): pass + @admin.register(OldNewsletterMailing) class OldNewsletterMailingAdmin(admin.ModelAdmin): form = LGEntryForm @@ -49,11 +58,13 @@ class OldNewsletterMailingAdmin(admin.ModelAdmin): "all": ("my_styles.css",) } + @admin.register(MailingStatus) class MailingStatusAdmin(admin.ModelAdmin): list_display = ('newsletter_mailing', 'subscriber', 'status', 'creation_date', 'newsletter') list_filter = ('status', 'creation_date', 'newsletter_mailing__newsletter') + @admin.register(NewsletterMailing) class NewsletterMailingAdmin(admin.ModelAdmin): form = LGEntryForm @@ -85,10 +96,10 @@ class NewsletterMailingAdmin(admin.ModelAdmin): "all": ("my_styles.css",) } + @admin.register(PostcardSubscriber) class PostcardSubscriberAdmin(admin.ModelAdmin): list_display = ('name', 'address') class Media: js = ('next-prev-links.js',) - |