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, OrderPayView, CheckPayView, CommentView 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'), # 订单支付 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, 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 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.urls import path from apps.order import views from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView, CommentView app_name = 'order' urlpatterns = [ path('index/', views.index, name='index'), 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/<int: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/(\d+)$',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$', 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="check"), path("comment/<int:order_id>", CommentView.as_view(), name="comment"), ]