relations widget
This commit is contained in:
parent
824e2d5418
commit
c8aad377a0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user