Files
rogaining_srv/rog/admin.py
2022-02-08 16:44:09 +05:30

23 lines
876 B
Python

from django.contrib import admin
from leaflet.admin import LeafletGeoAdmin
from leaflet.admin import LeafletGeoAdminMixin
from leaflet_admin_list.admin import LeafletAdminListMixin
from .models import RogEvent, Shop, EventRoute, ShopRoute
class RogAdmin(LeafletAdminListMixin, LeafletGeoAdminMixin, admin.ModelAdmin):
list_display=['title', 'venue', 'at_date',]
class ShopAdmin(LeafletAdminListMixin, LeafletGeoAdminMixin, admin.ModelAdmin):
list_display=['name',]
class EventRouteAdmin(LeafletAdminListMixin, LeafletGeoAdminMixin, admin.ModelAdmin):
list_display=['name',]
class ShopRouteAdmin(LeafletAdminListMixin, LeafletGeoAdminMixin, admin.ModelAdmin):
list_display=['name',]
admin.site.register(RogEvent, RogAdmin)
admin.site.register(Shop, ShopAdmin)
admin.site.register(EventRoute, EventRouteAdmin)
admin.site.register(ShopRoute, ShopRouteAdmin)