24 lines
562 B
Python
24 lines
562 B
Python
from django.contrib.gis import admin
|
|
|
|
from .models import DataLayer, Licence, Map, Pictogram, TileLayer
|
|
|
|
|
|
class TileLayerAdmin(admin.ModelAdmin):
|
|
list_display = (
|
|
"name",
|
|
"rank",
|
|
)
|
|
list_editable = ("rank",)
|
|
|
|
|
|
class MapAdmin(admin.GISModelAdmin):
|
|
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)
|