SOITA/categories/urls.py

14 lines
318 B
Python
Raw Normal View History

2021-12-12 11:35:35 +01:00
from rest_framework.routers import DefaultRouter
2022-01-08 22:15:30 +01:00
from django.urls import path
2021-12-12 11:35:35 +01:00
2022-01-08 22:15:30 +01:00
from categories.views import CategoryModelViewSet, category
2021-12-12 11:35:35 +01:00
2021-12-13 23:22:11 +01:00
router = DefaultRouter(trailing_slash=False)
2021-12-12 11:35:35 +01:00
router.register("items", CategoryModelViewSet)
2022-01-08 22:15:30 +01:00
urlpatterns = [
path('<category_name>', category),
]
2022-01-09 22:29:40 +01:00
urlpatterns += router.urls