From c8aad377a01cbfe39888211ed9159d1912642416 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sat, 20 Aug 2011 15:52:58 +0530 Subject: [PATCH] relations widget --- gazetteer/places/admin.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gazetteer/places/admin.py b/gazetteer/places/admin.py index 7fe196b..1880d11 100644 --- a/gazetteer/places/admin.py +++ b/gazetteer/places/admin.py @@ -5,10 +5,14 @@ class FeatureNamesInline(admin.StackedInline): model = Name extra = 3 +class FeatureRelationInline(admin.TabularInline): + model = Feature.relationships.through + extra = 1 + class FeatureAdmin(admin.GeoModelAdmin): search_fields = ['preferred_name'] list_filter = ('feature_type',) - inlines = [FeatureNamesInline] + inlines = [FeatureNamesInline, FeatureRelationInline] list_per_page = 500 # map_template = 'gis/admin/osm.html' # default_lon = 72.855211097628413