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, 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'), # 订单评论 ]
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, 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.urls import include, re_path, path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView, CommentView app_name = 'order' 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('comment/(?P<order_id>.+)/', CommentView.as_view(), name='comment'), # 订单评论 ]
from django.conf.urls import url from apps.order.views import OrderIndexView,CreateOrderView,UserCenterOrder,OrderPayView,CheckPayView urlpatterns = [ #订单首页 url(r'^order_index',OrderIndexView.as_view()), #创建订单 url(r'^create_order',CreateOrderView.as_view()), #用户中心订单 url(r'^user_center_order',UserCenterOrder.as_view()), #Alipay支付 url(r'^pay',OrderPayView.as_view()), #检测订单是否支付成功 url(r'^check',CheckPayView.as_view()), ]
from django.urls import path, re_path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView, 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', CheckPayView.as_view(), name='check'), # 查询订单结果 re_path(r'^comment/(?P<order_id>\d+)$', CommentView.as_view(), name='comment') # 评论 ]
from django.urls import 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'), # 支付查询 path('comment/<str:order_id>', OrderCommentView.as_view(), name='comment'), #评论 ]