New REST services for all entities
This commit is contained in:
15
api/urls.py
Normal file
15
api/urls.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.urls import include, path
|
||||
from rest_framework import routers
|
||||
from .views import ContainerViewSet, ContainerTypeViewSet, AssetViewSet, GtinProductViewSet
|
||||
|
||||
|
||||
router = routers.DefaultRouter()
|
||||
router.register(r'containers', ContainerViewSet)
|
||||
router.register(r'container_types', ContainerTypeViewSet)
|
||||
router.register(r'assets', AssetViewSet)
|
||||
router.register(r'products', GtinProductViewSet)
|
||||
|
||||
urlpatterns = [
|
||||
path('', include(router.urls)),
|
||||
path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
|
||||
]
|
||||
Reference in New Issue
Block a user