From df8c450c5ee993bf997e3ae9de52e8b1c91e91d6 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Wed, 2 Nov 2016 12:44:30 -0400 Subject: launched new homepage and misc improvements --- app/jrnl/admin.py | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) (limited to 'app/jrnl/admin.py') diff --git a/app/jrnl/admin.py b/app/jrnl/admin.py index b49837a..e71b733 100644 --- a/app/jrnl/admin.py +++ b/app/jrnl/admin.py @@ -3,30 +3,14 @@ from django import forms from django.contrib.gis.admin import OSMGeoAdmin from utils.widgets import AdminImageWidget, LGEntryForm -from .models import Entry, EntryAside, HomepageCurrator, EntryTitleSong +from .models import Entry, HomepageCurrator from photos.forms import GalleryForm -class EntryAsideInline(admin.TabularInline): - model = EntryAside - extra = 1 - - -class EntryAsideAdmin(admin.ModelAdmin): - pass - - -@admin.register(EntryTitleSong) -class EntryTitleSongAdmin(admin.ModelAdmin): - list_display = ('title', 'band', 'album', 'song') - list_filter = ('band',) - exclude = ('title', 'body_html', 'slug', 'pub_date') - - +@admin.register(Entry) class EntryAdmin(OSMGeoAdmin): form = LGEntryForm - inlines = [EntryAsideInline] def formfield_for_dbfield(self, db_field, **kwargs): if db_field.name == 'thumbnail' or db_field.name == 'image': @@ -78,12 +62,8 @@ class EntryAdmin(OSMGeoAdmin): openlayers_url = '/static/admin/js/OpenLayers.js' +@admin.register(HomepageCurrator) class HomepageCurratorAdmin(admin.ModelAdmin): form = GalleryForm filter_horizontal = ('popular',) pass - - -admin.site.register(EntryAside, EntryAsideAdmin) -admin.site.register(Entry, EntryAdmin) -admin.site.register(HomepageCurrator, HomepageCurratorAdmin) -- cgit v1.2.3-70-g09d2