from django.urls import path from adminapp.views import index, admin_users_restore, admin_categories_remove, admin_products_remove from adminapp.views import UserListView, UserCreateView, UserUpdateView, UserDeleteView, CategoryListView, \ CategoryCreateView, CategoryUpdateView, ProductListView, ProductCreateView, ProductUpdateView app_name = 'adminapp' urlpatterns = [ path('', index, name='index'), path('admin-users-read/', UserListView.as_view(), name='admin_users_read'), path('admin-users-create/', UserCreateView.as_view(), name='admin_users_create'), path('admin-users-update/<int:pk>/', UserUpdateView.as_view(), name='admin_users_update'), path('admin-users-remove/<int:pk>/', UserDeleteView.as_view(), name='admin_users_remove'), path('admin-users-restore/<int:user_id>/', admin_users_restore, name='admin_users_restore'), path('admin-categories-read/', CategoryListView.as_view(), name='admin_categories_read'), path('admin-categories-create/', CategoryCreateView.as_view(), name='admin_categories_create'), path('admin-categories-update/<int:pk>/', CategoryUpdateView.as_view(), name='admin_categories_update'), path('admin-categories-remove/<int:category_id>/', admin_categories_remove, name='admin_categories_remove'), path('admin-products-read/', ProductListView.as_view(), name='admin_products_read'), path('admin-products-create/', ProductCreateView.as_view(), name='admin_products_create'), path('admin-products-update/<int:pk>/', ProductUpdateView.as_view(), name='admin_products_update'), path('admin-products-remove/<int:product_id>/', admin_products_remove, name='admin_products_remove'), ]
from adminapp.views import ProductDeleteView from adminapp.views import UserListView from adminapp.views import UserUpdateView from adminapp.views import UserCreateView from adminapp.views import UserDeleteView from adminapp.views import CategoryCreateView from adminapp.views import CategoryUpdateView from adminapp.views import CategoryDeleteView app_name = 'adminapp' urlpatterns = [ path('product/create/', ProductCreateView.as_view(), name='create'), path('product/read/', ProductListView.as_view(), name='product'), path('product/read/cat/<cat_pk>', ProductListView.as_view(), name='category'), path('product/read/<pk>', ProductDetailView.as_view(), name='detail'), path('product/update/<pk>', ProductUpdateView.as_view(), name='update'), path('product/del/<pk>', ProductDeleteView.as_view(), name='delete'), # ------------------------------------------------------------------ path('product/user_create/', UserCreateView.as_view(), name='user_create'), path('user/read/', UserListView.as_view(), name='user'), path('product/user_update/<pk>', UserUpdateView.as_view(), name='user_update'), path('product/user_delete/<pk>', UserDeleteView.as_view(), name='user_delete'), # ------------------------------------------------------------------ path('product/cat_create/', CategoryCreateView.as_view(), name='cat_create'), path('product/cat_update/<pk>', CategoryUpdateView.as_view(), name='cat_update'), path('product/cat_delete/<pk>', CategoryDeleteView.as_view(), name='cat_delete'), ]
path('admin-users-create/', UserCreateView.as_view(), name='admin_users_create'), path('admin-users-update/<int:pk>/', UserUpdateView.as_view(), name='admin_users_update'), path('admin-user-remove/<int:pk>/', UserDeleteView.as_view(), name='admin_user_remove'), path('admin-user-restore/<int:pk>/', UserRestoryView.as_view(), name='admin_user_restore'), path('admin-products-read/', ProductListView.as_view(), name='admin_products_read'), path('admin-products-create/', ProductCreateView.as_view(), name='admin_products_create'), path('admin-products-update/<int:pk>/', ProductUpdateView.as_view(), name='admin_products_update'), path('admin-products-remove/<int:pk>/', ProductDeleteView.as_view(), name='admin_products_remove'), path('admin-order-read/', OrderListView.as_view(), name='admin_order_read'), path('admin-order-update/<pk>/', OrderUpdateView.as_view(), name='admin_order_update'), ]
from django.urls import path from adminapp.views import (AdminIndexView, UserListView, UserCreateView, UserUpdateView, UserDeleteView) from adminapp.views import (ProductListView, ProductCreateView, ProductUpdateView, ProductDeleteView) from adminapp.views import (ProductCategoryListView, ProductCategoryCreateView, ProductCategoryUpdateView, ProductCategoryDeleteView) app_name = 'adminapp' urlpatterns = [ path("", AdminIndexView.as_view(), name="index"), path("users/", UserListView.as_view(), name="admin_users"), path("users-create/", UserCreateView.as_view(), name="admin_users_create"), path("users-update/<int:pk>/", UserUpdateView.as_view(), name="admin_users_update"), path("users-delete/<int:pk>/", UserDeleteView.as_view(), name="admin_users_delete"), path("products/", ProductListView.as_view(), name="admin_products"), path("products-create/", ProductCreateView.as_view(), name="admin_products_create"), path("products-update/<int:pk>/", ProductUpdateView.as_view(), name="admin_products_update"), path("products-delete/<int:pk>/", ProductDeleteView.as_view(), name="admin_products_delete"), path("categories/", ProductCategoryListView.as_view(), name="admin_categories"), path("categories-create/", ProductCategoryCreateView.as_view(), name="admin_categories_create"), path("categories-update/<int:pk>/", ProductCategoryUpdateView.as_view(), name="admin_categories_update"), path("categories-delete/<int:pk>/", ProductCategoryDeleteView.as_view(), name="admin_categories_delete"), ]