diff options
Diffstat (limited to 'app/lttr/admin.py')
-rw-r--r-- | app/lttr/admin.py | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/app/lttr/admin.py b/app/lttr/admin.py index 1b919d6..4ca30ce 100644 --- a/app/lttr/admin.py +++ b/app/lttr/admin.py @@ -1,7 +1,8 @@ from django.contrib import admin -from .models import NewsletterMailing, Subscriber +from utils.widgets import AdminImageWidget, LGEntryForm +from .models import NewsletterMailing, Subscriber @admin.register(Subscriber) class SubscriberAdmin(admin.ModelAdmin): @@ -11,3 +12,31 @@ class SubscriberAdmin(admin.ModelAdmin): class Media: js = ('next-prev-links.js',) + + +@admin.register(NewsletterMailing) +class NewsletterMailingAdmin(admin.ModelAdmin): + form = LGEntryForm + list_display = ('title', 'pub_date', 'status') + fieldsets = ( + ('Entry', { + 'fields': ( + 'title', + 'body_markdown', + ('pub_date', 'status'), + 'slug', + 'featured_image', + ), + 'classes': ( + 'show', + 'extrapretty', + 'wide' + ) + } + ), + ) + class Media: + js = ('image-loader.js', 'next-prev-links.js') + css = { + "all": ("my_styles.css",) + } |