summaryrefslogtreecommitdiff
path: root/app/src/admin.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2018-03-16 09:28:50 -0500
committerluxagraf <sng@luxagraf.net>2018-03-16 09:28:50 -0500
commit44bc25404d077cbbfdcb79802573c28867fdb598 (patch)
treeaef1bc92ece3cc7353f62ac7881a61decb18bda4 /app/src/admin.py
parentf2da7beedbc5ea35c2d517a939d8cfa001edb32a (diff)
added images to src admin
Diffstat (limited to 'app/src/admin.py')
-rw-r--r--app/src/admin.py8
1 files changed, 5 insertions, 3 deletions
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')