From aa315bc4fb0b3f399a26cdefd3ee7eed195023fb Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sat, 18 Jun 2016 07:04:35 -0400 Subject: added syndication inline to notes --- app/notes/admin.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'app/notes') diff --git a/app/notes/admin.py b/app/notes/admin.py index e439168..dcd3576 100644 --- a/app/notes/admin.py +++ b/app/notes/admin.py @@ -1,11 +1,22 @@ from django.contrib import admin from django.contrib.gis.admin import OSMGeoAdmin +from django.contrib.contenttypes.admin import GenericTabularInline from notes.models import Note, LuxNote - +from syndication.models import SyndicatedItem from utils.widgets import LGEntryForm, OLAdminBase +class SyndicatedInline(GenericTabularInline): + model = SyndicatedItem + extra = 1 + max_num = 1 + + class LuxNoteAdmin(OLAdminBase): + inlines = [ + SyndicatedInline, + + ] prepopulated_fields = {"slug": ('title',)} list_display = ('slug', 'pub_date', 'location') fieldsets = ( -- cgit v1.2.3-70-g09d2