From 33209aed7c3e858d95576bdcfefa17c3f5d7597b Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 5 Feb 2020 16:18:53 -0500 Subject: migrated newsletter templates and updated mailing model --- app/lttr/admin.py | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'app/lttr/admin.py') 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",) + } -- cgit v1.2.3-70-g09d2