summaryrefslogtreecommitdiff
path: root/app/sightings/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/sightings/admin.py')
-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)