diff options
Diffstat (limited to 'app/posts/admin.py')
-rw-r--r-- | app/posts/admin.py | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/app/posts/admin.py b/app/posts/admin.py index 22c7955..f9d679b 100644 --- a/app/posts/admin.py +++ b/app/posts/admin.py @@ -4,7 +4,7 @@ from django.contrib.gis.admin import OSMGeoAdmin from django.contrib.contenttypes.admin import GenericStackedInline from utils.widgets import AdminImageWidget, LGEntryForm -from .models import Post +from .models import Post, Trip from media.models import LuxImage from utils.util import get_latlon @@ -97,4 +97,31 @@ class PostAdmin(OSMGeoAdmin): } - +@admin.register(Trip) +class TripAdmin(OSMGeoAdmin): + form = LGEntryForm + list_display = ('title', ) + prepopulated_fields = {'slug': ('title',)} + search_fields = ('title',) + fieldsets = ( + ('Region', { + 'fields': ( + 'title', + 'subtitle', + 'body_markdown', + 'slug', + 'date_started', + 'date_ended', + 'featured_image' + ), + 'classes': ( + 'show', + 'extrapretty' + ) + }), + ) + class Media: + js = ('image-loader.js', 'next-prev-links.js') + css = { + "all": ("my_styles.css",) + } |