26 lines
796 B
Python
26 lines
796 B
Python
from django.urls import path
|
|
from rest_framework.routers import DefaultRouter
|
|
|
|
from apps.farms.views import (
|
|
CycleViewSet,
|
|
FlockViewSet,
|
|
KandangViewSet,
|
|
SiteViewSet,
|
|
pusat_change_code,
|
|
pusat_register,
|
|
pusat_registration_status,
|
|
)
|
|
|
|
router = DefaultRouter()
|
|
router.register("sites", SiteViewSet, basename="site")
|
|
router.register("kandangs", KandangViewSet, basename="kandang")
|
|
router.register("flocks", FlockViewSet, basename="flock")
|
|
router.register("cycles", CycleViewSet, basename="cycle")
|
|
|
|
urlpatterns = [
|
|
path("pusat/register/", pusat_register, name="pusat-register"),
|
|
path("pusat/change-code/", pusat_change_code, name="pusat-change-code"),
|
|
path("pusat/registration/", pusat_registration_status, name="pusat-registration-status"),
|
|
*router.urls,
|
|
]
|