コード例 #1
0
ファイル: urls.py プロジェクト: lxf-00/webproject1
from django.conf.urls import url
from order.views import OrderPlaceView, OrderCommitView, OrderPayView, OrderCheckView, OrderCommentView

# 配置URL和views(路由)
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='check'),  # 支付结果查询
    url(r'^comment/(?P<order_id>\d+)$',
        OrderCommentView.as_view(),
        name='comment'),  # 订单评论
]
コード例 #2
0
ファイル: urls.py プロジェクト: bookandmusic/daliyfresh
from django.contrib import admin
from django.urls import path, include
from order.views import OrderPlaceView, OrderCommitView, OrderPayView, CheckPayView, CommentView

app_name = "order"

urlpatterns = [
    path('place', OrderPlaceView.as_view(), name="orderplace"),
    path('commit', OrderCommitView.as_view(), name="ordercommit"),
    path('pay', OrderPayView.as_view(), name='pay'),
    path('check', CheckPayView.as_view(), name='check'),
    path('comment/<int:order_id>', CommentView.as_view(), name="comment")
]
コード例 #3
0
from django.urls import path, re_path
from 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(r'^comment/(?P<order_id>.+)/$',
            CommentView.as_view(),
            name='comment'),  # 订单评论
]