from django.conf.urls import url from apps.order.views import OrderPlaceView, OrderCommitView urlpatterns = [ url(r'^place', OrderPlaceView.as_view(), name='place'), url(r'^commit$', OrderCommitView.as_view(), name='commit'), ]
from django.conf.urls import url from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView, CommentView urlpatterns = [ url(r'^place$', OrderPlaceView.as_view(), name='place'), # 提交订单页面显示 url(r'^commit$', OrderCommitView.as_view(), name='commit'), # 订单创建 url(r'^pay$', OrderPayView.as_view(), name='pay'), # 订单支付 url(r'^check$', CheckPayView.as_view(), name='check'), # 查询支付交易结果 url(r'^comment/(?P<order_id>.+)$', CommentView.as_view(), name='comment'), # 订单评论 ]
from django.urls import path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, OrderCheckView, CommentView urlpatterns = [ path('place', OrderPlaceView.as_view(), name='place'), # 显示提交订单页面 path('commit', OrderCommitView.as_view(), name='commit'), # 执行提交订单操作 path('pay', OrderPayView.as_view(), name='pay'), # 订单支付 path('check', OrderCheckView.as_view(), name='ckeck'), # 查询支付结果 path('comment/<order_id>', CommentView.as_view(), name='comment'), # 订单评论 ]
from django.conf.urls import url from apps.order.views import OrderPlaceView,OrderCommitView urlpatterns = [ # 显示提交订单页面 url(r'^place$', OrderPlaceView.as_view(), name='place'), # 订单提交 url(r'^commit$', OrderCommitView.as_view(), name='commit'), ]
from django.urls import path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, OrderCheckView, CommentView, ShipmentsView, \ ReceivingView, OrderDetailView from django.contrib.auth.decorators import login_required urlpatterns = [ path('place/', login_required(OrderPlaceView.as_view()), name='place'), path('commit/', OrderCommitView.as_view(), name='commit'), path('pay/', OrderPayView.as_view(), name='pay'), path('check/', OrderCheckView.as_view(), name='check'), path('comment/', login_required(CommentView.as_view()), name='comment'), path('shipments/', ShipmentsView.as_view(), name='shipments'), path('receiving/', ReceivingView.as_view(), name='receiving'), path('detail/', login_required(OrderDetailView.as_view()), name='detail') ]
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.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView, CommentView from django.urls.conf import re_path app_name = 'order' urlpatterns = [ re_path(r'^place$', OrderPlaceView.as_view(), name='place'), # 显示 提交订单页面 re_path(r'^commit$', OrderCommitView.as_view(), name='commit'), # 创建 订单 re_path(r'^pay$', OrderPayView.as_view(), name='pay'), # 订单支付 re_path(r'^check$', CheckPayView.as_view(), name='check'), # 检测支付结果 re_path(r'^comment/(?P<order_id>.+)$', CommentView.as_view(), name='comment'), # 显示订单评论 ]
from django.urls import path, re_path from apps.order.views import OrderPlaceView, OrderNowView, OrderCommitView, OrderPayView, OrderCheckPay, OrderConfirmReceive, CommentView urlpatterns = [ path('place/', OrderPlaceView.as_view(), name='place'), # 创建订单(购物车下单) path('now/', OrderNowView.as_view(), name='now'), # 创建订单(立即购买直接下单) path('commit/', OrderCommitView.as_view(), name='commit'), # 提交订单 path('pay/', OrderPayView.as_view(), name='pay'), # 订单支付 path('checkpay/', OrderCheckPay.as_view(), name='checkpay'), # 订单支付结果检查 path('confirmreceive/', OrderConfirmReceive.as_view(), name='confirmreceive'), # 订单确认收货 re_path(r'^comment/(?P<order_id>.+)$', CommentView.as_view(), name='comment'), # 订单评论 ]
from django.conf.urls import url from apps.order.views import OrderPlaceView, OrderCommitView app_name = 'order' urlpatterns = [ url(r'^place$', OrderPlaceView.as_view(), name='place'), # 提交订单页面显示 url(r'^commit$', OrderCommitView.as_view(), name='commit'), # 订单创建 # url(r'^pay$', OrderPayView.as_view(), name='pay'), # 订单支付 ]
from django.urls import path, re_path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView, OrderCommentView urlpatterns = [ path('place/', OrderPlaceView.as_view(), name='place'), # 提交订单页面显示 path('commit/', OrderCommitView.as_view(), name='commit'), # 订单创建 path('pay/', OrderPayView.as_view(), name='pay'), # 订单创建 path('check/', CheckPayView.as_view(), name='check'), # 查询支付交易的结果 re_path(r'^comment/(?P<order_id>.+)$', OrderCommentView.as_view(), name='comment'), # 订单评论 ]
from django.conf.urls import url from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView, CommentView urlpatterns = [ url(r'^place$', OrderPlaceView.as_view(), name='place'), # 订单支付页面 url(r'^commit$', OrderCommitView.as_view(), name='commit'), # 订单创建 url(r'^pay$', OrderPayView.as_view(), name='pay'), # 订单支付 url(r'^check$', CheckPayView.as_view(), name='check'), # 查看支付订单的结果 url(r'^comment/(?P<order_id>.+)$', CommentView.as_view(), name='comment'), # 订单评论 ]
from django.conf.urls import url from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CommentView urlpatterns = [ url(r'^place$', OrderPlaceView.as_view(), name='place'), # 处理用户提交的订单请求 url(r'^commit$', OrderCommitView.as_view(), name='commit'), # 处理提交的订单 url(r'^pay$', OrderPayView.as_view(), name='pay'), # 支付 url(r'^comment/(?P<order_id>\d+)$', CommentView.as_view(), name='comment'), # 评论 ]
from django.urls import path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView app_name = 'order' urlpatterns = [ path('palce', OrderPlaceView.as_view(), name='place'), # 订单结算页面 path('commit', OrderCommitView.as_view(), name='commit'), #订单创建 path('pay', OrderPayView.as_view(), name='pay') # 订单支付 ]
from django.urls import path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, OrderCheckView, CommentView urlpatterns = [ path("place", OrderPlaceView.as_view(), name="place"), path("commit", OrderCommitView.as_view(), name="commit"), path("pay", OrderPayView.as_view(), name="pay"), path("check", OrderCheckView.as_view(), name="check"), path("comment/<int:order_id>", CommentView.as_view(), name="comment"), ]
from django.urls import re_path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, OrderCommentView app_name = "order" urlpatterns = [ re_path(r'^place$', OrderPlaceView.as_view(), name='place'), # display order page re_path(r'^commit$', OrderCommitView.as_view(), name='commit'), # create order re_path(r'^pay$', OrderPayView.as_view(), name='pay'), # pay order re_path(r'^comment/(?P<order_id>.+)$', OrderCommentView.as_view(), name='comment'), # order comment ]
from django.urls import path, re_path from apps.order.views import OrderPlaceView, OrderCommitView1, OrderCommitView2, OrderPayView, OrderCheckView urlpatterns = [ re_path('^place$', OrderPlaceView.as_view(), name="place"), re_path('^commit$', OrderCommitView2.as_view(), name="commit"), re_path('^pay', OrderPayView.as_view(), name="pay"), re_path('^check$', OrderCheckView.as_view(), name="check"), ]