from accounts.views import json_echo_view, get_token_view from webapp.views import IndexView, ProductView, ProductCreateView, \ ProductUpdateView, ProductDeleteView, CartView, CartAddView, \ CartDeleteView, CartDeleteOneView, OrderCreateView, WatchOrdersView app_name = 'webapp' urlpatterns = [ path('', IndexView.as_view(), name='index'), path('echo/', json_echo_view), path('get_token/', get_token_view), path( 'product/', include([ path('add/', ProductCreateView.as_view(), name='product_create'), path( '<int:pk>/', include([ path('', ProductView.as_view(), name='product_view'), path('update/', ProductUpdateView.as_view(), name='product_update'), path('delete/', ProductDeleteView.as_view(), name='product_delete'), path('add-to-cart/', CartAddView.as_view(), name='product_add_to_cart'), ])), ])),
from django.conf.urls.static import static from django.urls import path, include from django.conf import settings from django.contrib import admin from django.urls import path from webapp.views import (IndexView, ProductView, ProductUpdateView, ProductDeleteView, ProductCreateView, BasketListView, BasketView, BasketDeleteBack, OrderCreateView, OrderListView) urlpatterns = [ path('admin/', admin.site.urls), path('', IndexView.as_view(), name='product-list'), path('product/<int:pk>/', ProductView.as_view(), name='product-view'), path('product/add/', ProductCreateView.as_view(), name='product-add'), path('product/update/<int:pk>/', ProductUpdateView.as_view(), name='product-update'), path('product/delete/<int:pk>/', ProductDeleteView.as_view(), name='product-delete'), path('product/basket/', BasketListView.as_view(), name='basket-view'), path('product/send/<int:pk>/', BasketView.as_view(), name='basket-send'), path('product/basket/delete/<int:pk>/', BasketDeleteBack.as_view(), name='basket-delete'), path('order/', OrderCreateView.as_view(), name='order-add'), path('accounts/', include('accounts.urls')), path('order/list/', OrderListView.as_view(), name='order-list') ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path from django.conf import settings from django.conf.urls.static import static from webapp.views import IndexView, ProductView, ProductUpdateView, ProductCreateView, ProductDeleteView, \ OtzivCreateView, OtzivUpdateView, OtzivDeleteView app_name = 'webapp' urlpatterns = [ path('admin/', admin.site.urls), path('', IndexView.as_view(), name='index'), path('products/<int:pk>/', ProductView.as_view(), name='product_detail'), path('products/<int:pk>/update/', ProductUpdateView.as_view(), name='product_update'), path('products/create/', ProductCreateView.as_view(), name='product_create'), path('products/<int:pk>/delete/', ProductDeleteView.as_view(), name='product_delete'), path('otziv/<int:pk>/create/', OtzivCreateView.as_view(), name='otziv_create'), path('otziv/<int:pk>/update/', OtzivUpdateView.as_view(), name='otziv_update'), path('otziv/<int:pk>/delete/', OtzivDeleteView.as_view(), name='otziv_delete'), ]
include([ path( '<int:pk>/', include([ path('', ProductView.as_view(), name='product_view'), path('update/', ProductUpdateView.as_view(), name='product_update'), path('delete/', ProductDeleteView.as_view(), name='product_delete'), path('add-to-basket/', BasketAddView.as_view(), name='product_add_to_basket'), ])), path('create/', ProductCreateView.as_view(), name='product_create'), path('category/<int:pk>/', CategoryView.as_view(), name='product_category'), ])), path( 'cart/', include([ path( '<int:pk>/', include([ path('<delete/', BasketDeleteView.as_view(), name='basket_delete'), path('delete-one/',