summaryrefslogtreecommitdiff
path: root/app/src/admin.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2020-08-15 11:58:34 -0400
committerluxagraf <sng@luxagraf.net>2020-08-15 11:58:34 -0400
commitb66d000ee469539ce7aea557b612c0444177e36d (patch)
tree273547921dc6f9ded2a5681b82514c68e28ba448 /app/src/admin.py
parentd3e57c1bd17ad3e71810235a672d4782136901a5 (diff)
archived old unused apps and migrated fieldnotes to posts
Diffstat (limited to 'app/src/admin.py')
-rw-r--r--app/src/admin.py62
1 files changed, 0 insertions, 62 deletions
diff --git a/app/src/admin.py b/app/src/admin.py
deleted file mode 100644
index f354b15..0000000
--- a/app/src/admin.py
+++ /dev/null
@@ -1,62 +0,0 @@
-from django.contrib import admin
-from .models import Topic, SrcPost, 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')
- fieldsets = (
- ('Entry', {
- 'fields': (
- 'title',
- 'body_markdown',
- 'image',
- ('pub_date', 'status'),
- ('price', 'price_sale'),
- 'meta_description',
- ('slug', 'template_name', 'pages'),
- ),
- 'classes': (
- 'show',
- 'extrapretty',
- 'wide'
- )
- }
- ),
- )
-
-
-@admin.register(SrcPost)
-class PostAdmin(admin.ModelAdmin):
- form = LGEntryForm
- list_display = ('title', 'pub_date', 'enable_comments', 'status')
- list_filter = ('pub_date', 'enable_comments', 'status')
- prepopulated_fields = {"slug": ('title',)}
- fieldsets = (
- ('Entry', {
- 'fields': (
- 'title',
- 'body_markdown',
- ('pub_date', 'status'),
- 'topics',
- 'meta_description',
- ('slug', 'enable_comments', 'has_code', 'template_name'),
- ),
- 'classes': (
- 'show',
- 'extrapretty',
- 'wide'
- )
- }
- ),
- )
-
- class Media:
- js = ('image-loader.js', 'next-prev-links.js')