from django.urls import path from apps.cart.views import CarDeleteView, CartAddView, CartInfoView, CartUpdateView app_name = 'apps.cart' urlpatterns = [ path('', CartInfoView.as_view(), name='cart'), # 购物车页面 path('add', CartAddView.as_view(), name='add'), # 显示购物车页 path('update', CartUpdateView.as_view(), name='update'), # 显示购物车页 path('delete', CarDeleteView.as_view(), name='delete'), # 显示购物车页 ]
from django.urls import re_path from apps.cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView app_name = "cart" urlpatterns = [ re_path(r'^add$', CartAddView.as_view(), name='add'), re_path(r'^update$', CartUpdateView.as_view(), name='update'), re_path(r'^delete$', CartDeleteView.as_view(), name='delete'), re_path(r'^$', CartInfoView.as_view(), name='show'), ]
from django.conf.urls import url from apps.cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView urlpatterns = [ url(r'^add$', CartAddView.as_view(), name='cart_add'), #购物车添加 url(r'^$', CartInfoView.as_view(), name='show'), #购物车信息展示 url(r'^update$', CartUpdateView.as_view(), name='update'), #更新购物车记录 url(r'^delete$', CartDeleteView.as_view(), name='delete'), #删除购物车记录 ]
from django.conf.urls import url from apps.cart.views import CartInfoView, CartAddView, CartUpdateView, CartDeleteView urlpatterns = [ url(r'^$', CartInfoView.as_view(), name='show'), # 购物车首页 url(r'^add$', CartAddView.as_view(), name='add'), # 添加购物车 url(r'^update$', CartUpdateView.as_view(), name='update'), # 购物车页面的操作, 数量增加/减少,删除等 url(r'^delete$', CartDeleteView.as_view(), name='delete'), # 删除购物车内商品 ]
from django.urls import path, re_path from apps.cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView urlpatterns = [ path('add', CartAddView.as_view(), name='add'), # 购物车记录添加 path('', CartInfoView.as_view(), name='show'), # 购物车页面显示 path('update', CartUpdateView.as_view(), name='update'), # 购物车记录更新 path('delete', CartDeleteView.as_view(), name='delete'), # 购物车记录删除 ]
from django.conf.urls import url from apps.cart.views import CartInfoView, CartAddView urlpatterns = [ url(r'^$', CartInfoView.as_view(), name="show"), url(r'^add$', CartAddView.as_view(), name="add"), ]
from django.conf.urls import url from apps.cart.views import ( CartAddView, CartInfoView, CartUpdateView, CartDeleteView, ) urlpatterns = [ url('^add$', CartAddView.as_view(), name='add'), url('^$', CartInfoView.as_view(), name='show'), url('^update$', CartUpdateView.as_view(), name='update'), url('^delete$', CartDeleteView.as_view(), name='delete'), ]
from django.urls import path from apps.cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView urlpatterns = [ path('add', CartAddView.as_view(), name="add"), path("", CartInfoView.as_view(), name="show"), path("update", CartUpdateView.as_view(), name="update"), path("delete", CartDeleteView.as_view(), name="delete"), ]
from django.urls import path from apps.cart.views import CartView, CartAddView, CartUpdateView, CartDeleteView urlpatterns = [ path('', CartView.as_view(), name='show'), # 显示用户购物车页 path('add/', CartAddView.as_view(), name='add'), # 添加商品到购物车 path('update/', CartUpdateView.as_view(), name='update'), # 添加商品到购物车 path('delete/', CartDeleteView.as_view(), name='delete'), # 从购物车删除商品 ]