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",)
|
2019-04-07 04:51:12 -05:00
|
|
|
autocomplete_fields = ("owner", "editors")
|
2019-04-09 03:20:30 -05:00
|
|
|
list_filter = ("share_status",)
|
2019-04-07 04:43:16 -05:00
|
|
|
|
|
|
|
|
2023-12-17 05:20:30 -06: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)
|
2023-12-17 05:20:30 -06:00
|
|
|
admin.site.register(Pictogram, PictogramAdmin)
|
2018-05-18 14:40:38 -05:00
|
|
|
admin.site.register(TileLayer, TileLayerAdmin)
|
|
|
|
admin.site.register(Licence)
|