summaryrefslogtreecommitdiff
path: root/app/sketches/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/sketches/admin.py')
-rw-r--r--app/sketches/admin.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/app/sketches/admin.py b/app/sketches/admin.py
new file mode 100644
index 0000000..9f3c087
--- /dev/null
+++ b/app/sketches/admin.py
@@ -0,0 +1,34 @@
+from django.contrib import admin
+from django.contrib.gis.admin import OSMGeoAdmin
+from django.contrib.contenttypes.admin import GenericTabularInline
+from .models import Sketch
+from utils.widgets import LGEntryForm, OLAdminBase
+
+
+@admin.register(Sketch)
+class SketchAdmin(OLAdminBase):
+ form = LGEntryForm
+
+ prepopulated_fields = {"slug": ('title',)}
+ list_display = ('title', 'slug', 'pub_date', 'location')
+ fieldsets = (
+ ('Note', {
+ 'fields': (
+ ('title', 'slug'),
+ 'body_markdown',
+ ('pub_date', 'status'),
+ 'point'
+ ),
+ 'classes': (
+ 'show',
+ 'extrapretty',
+ 'wide'
+ )
+ }
+ ),
+ )
+ class Media:
+ js = ('image-loader.js',)
+
+
+