summaryrefslogtreecommitdiff
path: root/app/lttr/admin.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-02-05 16:18:53 -0500
committerluxagraf <sng@luxagraf.net>2020-02-05 16:18:53 -0500
commit33209aed7c3e858d95576bdcfefa17c3f5d7597b (patch)
tree08e6877551da29c0b645208c9e9e806c4624cd42 /app/lttr/admin.py
parent932a69ba325fab012630313edcfe697e93d340d7 (diff)
migrated newsletter templates and updated mailing model
Diffstat (limited to 'app/lttr/admin.py')
-rw-r--r--app/lttr/admin.py31
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",)
+ }