umap/umap/admin.py
2019-04-09 10:20:30 +02:00

20 lines
539 B
Python

from django.contrib.gis import admin
from .models import Map, DataLayer, Pictogram, TileLayer, Licence
class TileLayerAdmin(admin.ModelAdmin):
list_display = ('name', 'rank', )
list_editable = ('rank', )
class MapAdmin(admin.OSMGeoAdmin):
search_fields = ("name",)
autocomplete_fields = ("owner", "editors")
list_filter = ("share_status",)
admin.site.register(Map, MapAdmin)
admin.site.register(DataLayer)
admin.site.register(Pictogram)
admin.site.register(TileLayer, TileLayerAdmin)
admin.site.register(Licence)