Exemplo n.º 1
0
from django.urls import path
from 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')
]
Exemplo n.º 2
0
from django.conf.urls import url
from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

urlpatterns = [
	url(r'^add$', CartAddView.as_view(), name='add'),   # 购物车添加记录
	url(r'^$', CartInfoView.as_view(), name='show'),    # 购物车页面显示
	url(r'^update$', CartUpdateView.as_view(), name='update'),  # 购物车记录更新
	url(r'^delete$', CartDeleteView.as_view(), name='delete'),  # 购物车记录删除
]
Exemplo n.º 3
0
# encoding utf-8

from django.conf.urls import url
from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

urlpatterns = [
    # 商品详情 购物车添加
    url(R'^add$', CartAddView.as_view(), name='add'),
    # 购物车列表
    url(R'^$', CartInfoView.as_view(), name='show'),
    # 更新购物车数量
    url(r'^update$', CartUpdateView.as_view(), name='update'),
    # 删除购物车指定商品
    url(r'^delete$', CartDeleteView.as_view(), name='delete')
]
Exemplo n.º 4
0
from django.conf.urls import url
from django.urls import path, re_path
from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

urlpatterns = [
    path('add', CartAddView.as_view(), name='add'),  # 购物车记录添加
    re_path('^$', CartInfoView.as_view(), name='show'),  # 购物车页面显示
    path('update', CartUpdateView.as_view(), name='update'),  # 购物车记录更新
    path('delete', CartDeleteView.as_view(), name='delete'),  # 购物车记录删除
]
Exemplo n.º 5
0
from django.contrib import admin
from django.urls import path, include
from 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"),  # 购物车记录删除
]
Exemplo n.º 6
0
from django.urls import path, include, re_path
from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

app_name = 'cart'
urlpatterns = [
    re_path(r'^add$', CartAddView.as_view(), name='add'),  # 添加购物车记录
    re_path(r'^$', CartInfoView.as_view(), name='show_cart'),  # 显示购物车
    re_path(r'^update$', CartUpdateView.as_view(), name='update'),  # 更新购物车数据
    re_path(r'^delete$', CartDeleteView.as_view(), name='delete'),  # 删除购物车数据
]
Exemplo n.º 7
0
"""dailyfresh URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from cart.views import CartView, CartInfoView, CartUpdateView, CartDeleteView

app_name = 'cart'

urlpatterns = [
    path('', CartInfoView.as_view(), name="show"),  # 购物车页面显示
    path('add', CartView.as_view(), name="add"),  # 添加购物车
    path('update', CartUpdateView.as_view(), name="update"),  # 购物车记录更新
    path('delete', CartDeleteView.as_view(), name="delete"),  # 购物车记录删除
]