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'), # 订单评论 ]
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 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.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') ]
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 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 path, re_path from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, CommentView, BuyNowOrderPlaceView urlpatterns = [ path('place', OrderPlaceView.as_view(), name='place'), # 提交订单页面显示 path('commit', OrderCommitView.as_view(), name='commit'), # 提交订单页面显示 path('pay', OrderPayView.as_view(), name='pay'), # 订单支付 re_path(r'^comment/(?P<order_id>.+)$', CommentView.as_view(), name='comment'), # 订单评论 path('buynow', BuyNowOrderPlaceView.as_view(), name='buynow'), # 订单评论 ]
from django.conf.urls import url from apps.order.views import OrderPlaceView, OrderCommitView, OrderPayView, OrderCheckView, 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$', OrderCheckView.as_view(), name=''), # 订单交易结果 url(r'^comment/(?P<order_id>.*)$', CommentView.as_view(), name='comment') # 订单评论 ]