49 lines
3.0 KiB
Python
49 lines
3.0 KiB
Python
from sys import prefix
|
|
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, UserActionViewset, UserMakeActionViewset, UserDestinations, UpdateOrder, LocationInBound, DeleteDestination, CustomAreaLocations, GetAllGifuAreas, CustomAreaNames, userDetials, UserTracksViewSet, CatByCity, ChangePasswordView, GoalImageViewSet, CheckinImageViewSet
|
|
from django.urls import path, include
|
|
from knox import views as knox_views
|
|
|
|
from .views import TestActionViewSet
|
|
|
|
|
|
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')
|
|
router.register(prefix='track', viewset=UserTracksViewSet, basename='track')
|
|
router.register(prefix='goalimage', viewset=GoalImageViewSet, basename='goalimage')
|
|
router.register(prefix='checkinimage', viewset=CheckinImageViewSet, basename='checkinimage')
|
|
|
|
|
|
urlpatterns = router.urls
|
|
|
|
urlpatterns += [
|
|
path('inperf/', LocationsInPerf, name="location_perf"),
|
|
path('insubperf', LocationsInSubPerf, name='location_subperf'),
|
|
path('inbound', LocationInBound, name='location_bound'),
|
|
path('customarea/', CustomAreaLocations, name='custom_area_location'),
|
|
path('subperfinmain/', SubPerfInMainPerf, name="sub_perf"),
|
|
path('allgifuareas/', GetAllGifuAreas, name="gifu_area"),
|
|
path('perfext/', ExtentForSubPerf, name="sub_perf_ext"),
|
|
path('mainperfext/', ExtentForMainPerf, name="main_perf_ext"),
|
|
path('cats/', CatView, name='cats'),
|
|
path('catbycity/', CatByCity, name='cat_by_city'),
|
|
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'),
|
|
path('useraction/', UserActionViewset, name='user_action'),
|
|
path('makeaction/', UserMakeActionViewset, name='user_action'),
|
|
path('destinations/', UserDestinations, name='user_destinations'),
|
|
path('updateorder/', UpdateOrder, name='updateorder'),
|
|
path('delete_destination/', DeleteDestination, name='delete_detination'),
|
|
path('customareanames/', CustomAreaNames, name='custom_area_name'),
|
|
path('userdetials/', userDetials, name='user_detials'),
|
|
path('change-password/', ChangePasswordView.as_view(), name='change-password')
|
|
# path('goal-image/', GoalImageViewSet.as_view(), name='goal-image')
|
|
] |