summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2022-02-14 20:49:04 -0500
committerluxagraf <sng@luxagraf.net>2022-02-14 20:49:04 -0500
commita2a635faeb01dbe213246e94c142ea1b69eb4964 (patch)
tree86d5a3d155da92f0aa2e276a12e55f7599ff94d0 /app
parent2b5b7d3bb34ef3d9cff7c8f0835bdee6c70a9b51 (diff)
sght: cleaned up admin
Diffstat (limited to 'app')
-rw-r--r--app/sightings/admin.py32
1 files changed, 31 insertions, 1 deletions
diff --git a/app/sightings/admin.py b/app/sightings/admin.py
index 7285a7d..fc948c9 100644
--- a/app/sightings/admin.py
+++ b/app/sightings/admin.py
@@ -51,7 +51,6 @@ class SightingInline(OSMGeoAdmin, admin.StackedInline):
@admin.register(AP)
class APAdmin(admin.ModelAdmin):
form = LGEntryForm
- form = LGEntryForm
inlines = [
SightingInline,
]
@@ -59,13 +58,44 @@ class APAdmin(admin.ModelAdmin):
list_filter = ('apclass__kind', 'apclass')
search_fields = ['common_name', 'scientific_name']
+ fieldsets = (
+ ('Entry', {
+ 'fields': (
+ ('common_name'),
+ 'body_markdown',
+ 'featured_image',
+ ),
+ 'classes': (
+ 'show',
+ 'extrapretty',
+ 'wide'
+ )
+ }
+ ),
+ ('Extras', {
+ 'fields': (
+ 'slug',
+ 'apclass',
+ 'scientific_name',
+ 'code',
+ ),
+ 'classes': (
+ 'collapse',
+ )
+ }),
+ )
+
def have_seen(self, obj):
return obj.seen
have_seen.admin_order_field = 'seen'
have_seen.boolean = True
+
class Media:
js = ('image-loader.js', 'next-prev-links.js')
+ css = {
+ "all": ("my_styles.css",)
+ }
@admin.register(Sighting)