from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import EstablishmentViewSet, establishments_datatable_api, establishments_page, EstablishmentTypeViewSet

router = DefaultRouter()
router.register(r'establishments', EstablishmentViewSet, basename='establishment')
router.register(r'establishment-types', EstablishmentTypeViewSet, basename='establishmenttype')

urlpatterns = [
    path('', include(router.urls)),
]

urlpatterns = [
    path('', include(router.urls)),
    path('establishments-datatable/', establishments_datatable_api, name='establishments_datatable'),
]