From 560ace68f8e37f23043a4df2e7bedb6529350994 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Sun, 7 Apr 2019 11:43:16 +0200 Subject: [PATCH] Allow to search maps in the admin --- umap/admin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/umap/admin.py b/umap/admin.py index 74193e3b..c1e3d159 100644 --- a/umap/admin.py +++ b/umap/admin.py @@ -6,7 +6,12 @@ class TileLayerAdmin(admin.ModelAdmin): list_display = ('name', 'rank', ) list_editable = ('rank', ) -admin.site.register(Map, admin.OSMGeoAdmin) + +class MapAdmin(admin.OSMGeoAdmin): + search_fields = ("name",) + + +admin.site.register(Map, MapAdmin) admin.site.register(DataLayer) admin.site.register(Pictogram) admin.site.register(TileLayer, TileLayerAdmin)