Files
rogaining_srv/rog/urls.py
Mohamed Nouffer 11037587df update
2022-04-27 15:47:37 +05:30

30 lines
1.5 KiB
Python

from rest_framework import urlpatterns
from rest_framework.routers import DefaultRouter
from .views import LocationViewSet, Location_lineViewSet, Location_polygonViewSet, Jpn_Main_PerfViewSet, Jpn_PerfViewSet, LocationsInPerf, SubInPerf, ExtentForSubPerf, SubPerfInMainPerf, ExtentForMainPerf, LocationsInSubPerf, CatView, RegistrationAPI, LoginAPI, UserAPI
from django.urls import path, include
from knox import views as knox_views
router = DefaultRouter()
router.register(prefix='location', viewset=LocationViewSet, basename='location')
router.register(prefix='location_line', viewset=Location_lineViewSet, basename="location_line")
router.register(prefix='location_polygon', viewset=Location_polygonViewSet, basename='location_polygon')
router.register(prefix='perf_main', viewset=Jpn_Main_PerfViewSet, basename='main_perf')
router.register(prefix='perf', viewset=Jpn_PerfViewSet, basename='perf')
urlpatterns = router.urls
urlpatterns += [
path('inperf/', LocationsInPerf, name="location_perf"),
path('insubperf', LocationsInSubPerf, name='location_subperf'),
path('subperfinmain/', SubPerfInMainPerf, name="sub_perf"),
path('perfext/', ExtentForSubPerf, name="sub_perf_ext"),
path('mainperfext/', ExtentForMainPerf, name="main_perf_ext"),
path('cats/', CatView, name='cats'),
path('register/', RegistrationAPI.as_view()),
path('login/', LoginAPI.as_view()),
path('user/', UserAPI.as_view()),
path('logout/', knox_views.LogoutView.as_view(), name='knox_logout'),
]