From 44bc25404d077cbbfdcb79802573c28867fdb598 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Fri, 16 Mar 2018 09:28:50 -0500 Subject: added images to src admin --- app/jrnl/admin.py | 3 ++- app/src/admin.py | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/jrnl/admin.py b/app/jrnl/admin.py index 580d06f..c3b0c81 100644 --- a/app/jrnl/admin.py +++ b/app/jrnl/admin.py @@ -76,7 +76,8 @@ class EntryAdmin(OSMGeoAdmin): openlayers_url = '/static/admin/js/OpenLayers.js' class Media: - js = ('image-loader.js','next-prev-links.js') + js = ('image-loader.js', 'next-prev-links.js') + @admin.register(HomepageCurrator) class HomepageCurratorAdmin(admin.ModelAdmin): diff --git a/app/src/admin.py b/app/src/admin.py index 25237ff..815267c 100644 --- a/app/src/admin.py +++ b/app/src/admin.py @@ -3,10 +3,12 @@ from .models import Topic, Post, Book from utils.widgets import LGEntryForm +@admin.register(Topic) class TopicAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ('name',), "pluralized_name": ('name',)} +@admin.register(Book) class BookAdmin(admin.ModelAdmin): prepopulated_fields = {"slug": ('title', )} list_display = ('title', 'pub_date', 'status') @@ -31,6 +33,7 @@ class BookAdmin(admin.ModelAdmin): ) +@admin.register(Post) class PostAdmin(admin.ModelAdmin): form = LGEntryForm list_display = ('title', 'pub_date', 'enable_comments', 'status') @@ -55,6 +58,5 @@ class PostAdmin(admin.ModelAdmin): ), ) -admin.site.register(Book, BookAdmin) -admin.site.register(Topic, TopicAdmin) -admin.site.register(Post, PostAdmin) + class Media: + js = ('image-loader.js', 'next-prev-links.js') -- cgit v1.2.3-70-g09d2