From 02bb6034f2cfeb22714900ac81f31f6fbd41cdf9 Mon Sep 17 00:00:00 2001 From: Sanj Date: Sat, 20 Aug 2011 15:57:46 +0530 Subject: [PATCH] add fk_name in admin to deal with multiple foreign keys --- gazetteer/places/admin.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gazetteer/places/admin.py b/gazetteer/places/admin.py index 1880d11..f7bec73 100644 --- a/gazetteer/places/admin.py +++ b/gazetteer/places/admin.py @@ -8,6 +8,7 @@ class FeatureNamesInline(admin.StackedInline): class FeatureRelationInline(admin.TabularInline): model = Feature.relationships.through extra = 1 + fk_name = 'feature2' class FeatureAdmin(admin.GeoModelAdmin): search_fields = ['preferred_name']