diff options
author | luxagraf <sng@luxagraf.net> | 2018-03-16 09:28:50 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2018-03-16 09:28:50 -0500 |
commit | 44bc25404d077cbbfdcb79802573c28867fdb598 (patch) | |
tree | aef1bc92ece3cc7353f62ac7881a61decb18bda4 /app | |
parent | f2da7beedbc5ea35c2d517a939d8cfa001edb32a (diff) |
added images to src admin
Diffstat (limited to 'app')
-rw-r--r-- | app/jrnl/admin.py | 3 | ||||
-rw-r--r-- | app/src/admin.py | 8 |
2 files changed, 7 insertions, 4 deletions
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') |