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'), # 删除购物车记录 ]
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'), # 购物车删除一项订单 ]
"""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'), ]
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'), ]
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'), ]
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'), # 删除购物车数据 ]
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'), # 删除购物车记录 ]
# _*_ 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'), ]
#-*-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') ]
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'), ]
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') ]
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') ]
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"), ]
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"), # 购物车记录删除 ]
# -*- 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'), # 购物车记录删除 ]
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"), #购物车删除记录 ]
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'), #购物车记录删除 ]
"""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"), # 购物车记录删除 ]