first commit

This commit is contained in:
2022-02-08 16:44:09 +05:30
commit d366be57a1
25 changed files with 909 additions and 0 deletions

23
rog/admin.py Normal file
View File

@ -0,0 +1,23 @@
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)