homelog/api/urls.py

15 lines
545 B
Python

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'))
]