db va type togirlandi
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
from django.urls import include, path
|
||||
from django.urls import path, include
|
||||
from rest_framework.routers import DefaultRouter
|
||||
|
||||
from .views import CategoryView, FilialView, ProductsView, SubProductView, SubcategoryView
|
||||
from core.apps.api.views.category import FilialView, CategoryView, SubcategoryView, SubProductView
|
||||
from core.apps.api.views.products import ProductsView
|
||||
from core.apps.api.views.type import TypeView
|
||||
|
||||
router = DefaultRouter()
|
||||
router.register("filial", FilialView, basename="filial")
|
||||
router.register("subcategory", SubcategoryView, basename="subcategory")
|
||||
router.register("category", CategoryView, basename="category")
|
||||
router.register("products", ProductsView, basename="products")
|
||||
router.register("subproducts", SubProductView, basename="subproducts")
|
||||
urlpatterns = [path("", include(router.urls))]
|
||||
router.register("filials", FilialView, basename="filial")
|
||||
router.register("categories", CategoryView, basename="category")
|
||||
router.register("subcategories", SubcategoryView, basename="subcategory")
|
||||
router.register("products", ProductsView, basename="product")
|
||||
router.register("subproducts", SubProductView, basename="subproduct")
|
||||
router.register("types", TypeView, basename="type")
|
||||
|
||||
urlpatterns = [
|
||||
path("", include(router.urls)),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user