diff options
author | luxagraf <sng@luxagraf.net> | 2023-07-14 15:04:26 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2023-07-14 15:04:26 -0500 |
commit | 33a87ab2b62d4692c9e0450bccf203eafdd8cd80 (patch) | |
tree | a7933e366c2a70691c34210a10cccd81e3c77569 /app/posts/admin.py | |
parent | 9dc6e678a57203f0bc5c08f4780069b7cabdb45a (diff) |
posts: added notes for saving urls
Diffstat (limited to 'app/posts/admin.py')
-rw-r--r-- | app/posts/admin.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/app/posts/admin.py b/app/posts/admin.py new file mode 100644 index 0000000..a4e29b8 --- /dev/null +++ b/app/posts/admin.py @@ -0,0 +1,34 @@ +from django.contrib import admin + +from .models import Post, Note +from utils.widgets import AdminImageWidget, LGEntryForm + +from django.contrib.admin import SimpleListFilter + + +@admin.register(Post) +class PostAdmin(admin.ModelAdmin): + form = LGEntryForm + list_display = ('title', 'admin_url', 'author', 'date_last_pub', 'post_type', 'update_frequency', 'needs_update', 'days_overdue') + search_fields = ['title'] + list_filter = ['needs_update', 'author', 'post_type'] + + class Media: + js = ('image-loader.js', 'next-prev-links.js') + css = { + "all": ("my_styles.css",) + } + + +@admin.register(Note) +class NoteAdmin(admin.ModelAdmin): + form = LGEntryForm + list_display = ('date_created', 'title', 'post') + search_fields = ['title'] + list_filter = ['date_created'] + + class Media: + js = ('image-loader.js', 'next-prev-links.js') + css = { + "all": ("my_styles.css",) + } |