16 lines
		
	
	
		
			480 B
		
	
	
	
		
			Python
		
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			480 B
		
	
	
	
		
			Python
		
	
	
	
| 
 | |
| from django.urls import path, include
 | |
| from rest_framework.routers import DefaultRouter
 | |
| from apps.vm.views import VisitViewSet, VisitorViewSet, VpeopleViewSet
 | |
| 
 | |
| API_BASE_URL = 'api/vm/'
 | |
| HTML_BASE_URL = 'vm/'
 | |
| 
 | |
| router = DefaultRouter()
 | |
| router.register('visit', VisitViewSet, basename='visit')
 | |
| router.register('visitor', VisitorViewSet, basename='visitor')
 | |
| router.register('vpeople', VpeopleViewSet, basename='vpeople')
 | |
| urlpatterns = [
 | |
|     path(API_BASE_URL, include(router.urls)),
 | |
| ]
 |