Esempio n. 1
0
from django.conf.urls import url
from cart.views import CartInfoView, CartAddView, CartUpdateView, CartDeleteView

# 配置URL和views(路由)
urlpatterns = [
    url(r'^$', CartInfoView.as_view(), name='cart_info'),  # 购物车
    url(r'^add$', CartAddView.as_view(), name='add'),  # 添加购物车
    url(r'^update$', CartUpdateView.as_view(), name='update'),  # 购物车更新
    url(r'^delete$', CartDeleteView.as_view(), name='delete'),  # 删除购物车记录
]
Esempio n. 2
0
from django.contrib import admin
from django.urls import path
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'),  # 购物车页面显示
    re_path(r"^update/$", CartUpdateView.as_view(),
            name='update'),  # 购物车页面添加商品数
    re_path(r"^delete/$", CartDeleteView.as_view(),
            name='delete'),  # 购物车删除一项订单
]
Esempio n. 3
0
"""dailyfresh URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/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.urls import re_path

from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

urlpatterns = [
    re_path('^add$', CartAddView.as_view(), name='add'),
    re_path('^update$', CartUpdateView.as_view(), name='update'),
    re_path('^delete$', CartDeleteView.as_view(), name='delete'),
    re_path('^$', CartInfoView.as_view(), name='show'),
]
Esempio n. 4
0
from django.conf.urls import url
from 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'),
]
Esempio n. 5
0
from django.contrib import admin
from django.urls import path, include
from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

app_name = "cart"

urlpatterns = [
    path('add', CartAddView.as_view(), name='cartadd'),
    path('update', CartUpdateView.as_view(), name='cartupdate'),
    path('delete', CartDeleteView.as_view(), name='cart_delete'),
    path('', CartInfoView.as_view(), name='cartshow'),
]
Esempio 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'),  # 删除购物车数据
]
Esempio n. 7
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'),  # 删除购物车记录
]
Esempio n. 8
0
# _*_ coding:utf-8 _*_
from django.conf.urls import url
from cart.views import CartInfoView, CartAddView, CartDeleteView, CartUpdateView

urlpatterns = [
    url(r'^$', CartInfoView.as_view(), name='cart'),
    url(r'^add$', CartAddView.as_view(), name='add_to_cart'),
    url(r'^update$', CartUpdateView.as_view(), name='update'),
    url(r'^delete$', CartDeleteView.as_view(), name='delete'),
]
Esempio n. 9
0
#-*-coding:utf-8-*-
from django.contrib import admin
from django.urls import path
from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

app_name = 'cart'
urlpatterns = [
    path('add/', CartAddView.as_view(), name='add'),
    path('cart/', CartInfoView.as_view(), name='cart'),
    path('delete/', CartDeleteView.as_view(), name='delete'),
    path('update/', CartUpdateView.as_view(), name='update')
]
Esempio n. 10
0
from django.urls import path, re_path
from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

urlpatterns = [
    path('add/', CartAddView.as_view(), name='add'),
    path('info/', CartInfoView.as_view(), name='info'),
    path('update/', CartUpdateView.as_view(), name='update'),
    path('delete/', CartDeleteView.as_view(), name='delete'),
]
Esempio n. 11
0
from django.conf.urls import url

from cart.views import AddCartView, BaseCartView, CartInfoView, UpdateCartView, DeleteCartView

urlpatterns = [
    url(r'^add$', AddCartView.as_view(), name='add'),
    url(r'^cartinfo$', CartInfoView.as_view(), name='cartinfo'),
    url(r'^update$', UpdateCartView.as_view(), name='date'),
    url(r'^delete$', DeleteCartView.as_view(), name='delete')
]
Esempio n. 12
0
from django.conf.urls import url
from cart.views import CarAddView, CartInfoView, CartUpdateView, CartDelView

urlpatterns = [
    url(r'^add$', CarAddView.as_view(), name='add'),  # 添加商品
    url(r'^info$', CartInfoView.as_view(), name='info'),
    url(r'^update$', CartUpdateView.as_view(), name='update'),
    url(r'^del$', CartDelView.as_view(), name='del')
]
Esempio n. 13
0
from django.conf.urls import url
from cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView

urlpatterns = [
    # Examples:
    # url(r'^$', 'dailyfresh.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^add/$', CartAddView.as_view(), name='add'),
    url(r'^show/$', CartInfoView.as_view(), name="show"),
    url(r'^update/$', CartUpdateView.as_view(), name='update'),
    url(r'^delete/$', CartDeleteView.as_view(), name="delete"),
]
Esempio n. 14
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"),  # 购物车记录删除
]
Esempio n. 15
0
# -*- coding: 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'), # 购物车记录删除
]
Esempio n. 16
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"),  #购物车删除记录
]
Esempio n. 17
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'),  #购物车记录删除
]
Esempio n. 18
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"),  # 购物车记录删除
]