umap/umap/admin.py

34 lines
749 B
Python
Raw Normal View History

2018-05-18 14:40:38 -05:00
from django.contrib.gis import admin
2023-11-23 11:04:23 -06:00
from .models import DataLayer, Licence, Map, Pictogram, TileLayer
2018-05-18 14:40:38 -05:00
class TileLayerAdmin(admin.ModelAdmin):
2023-11-23 11:04:23 -06:00
list_display = (
"name",
"rank",
)
list_editable = ("rank",)
2018-05-18 14:40:38 -05:00
2019-04-07 04:43:16 -05:00
2023-02-22 08:19:38 -06:00
class MapAdmin(admin.GISModelAdmin):
2019-04-07 04:43:16 -05:00
search_fields = ("name",)
autocomplete_fields = ("owner", "editors")
list_filter = ("share_status",)
2019-04-07 04:43:16 -05:00
class PictogramAdmin(admin.ModelAdmin):
list_display = (
"name",
"category",
)
list_editable = ("category",)
list_filter = ("category",)
2019-04-07 04:43:16 -05:00
admin.site.register(Map, MapAdmin)
2018-05-18 14:40:38 -05:00
admin.site.register(DataLayer)
admin.site.register(Pictogram, PictogramAdmin)
2018-05-18 14:40:38 -05:00
admin.site.register(TileLayer, TileLayerAdmin)
admin.site.register(Licence)