Beispiel #1
0
# -*-coding:utf-8-*-
from django.conf.urls import url
from apps.cart.views import CartAddview, CartInfoView, CartUpdateView, CartDeleteView

app_name = 'apps.cart'
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'),  # 删除购物车中的商品记录
]
Beispiel #2
0
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'),  # 购物车记录删除
]
Beispiel #3
0
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'),
]
Beispiel #4
0
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'),
]
Beispiel #5
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.conf.urls import url

from apps.cart.views import CartAddView, CartInfoView, CartUpdateView, CartDeleteView
from django.urls import re_path


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'),  # 删除 购物车中 某个条目的商品记录
]
Beispiel #6
0
from django.conf.urls import url
#namespace为了反向找路径
from apps.cart import views
from apps.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'),  #购物车的删除
]
Beispiel #7
0
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"),
]
Beispiel #8
0
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'),  # 从购物车删除商品
]
Beispiel #9
0
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'),  # 购物车数据删除
]
Beispiel #10
0
from django.conf.urls import url
from apps.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')  # 购物车记录删除
] 
# 测试