New REST services for all entities

This commit is contained in:
2022-04-14 16:31:46 +02:00
parent 04b3377df7
commit 8cc1e7d8ad
13 changed files with 122 additions and 4 deletions

15
api/urls.py Normal file
View 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'))
]