当前位置: 首页>>代码示例>>Python>>正文


Python CheckoutSelectionView.as_view方法代码示例

本文整理汇总了Python中shop.views.checkout.CheckoutSelectionView.as_view方法的典型用法代码示例。如果您正苦于以下问题:Python CheckoutSelectionView.as_view方法的具体用法?Python CheckoutSelectionView.as_view怎么用?Python CheckoutSelectionView.as_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在shop.views.checkout.CheckoutSelectionView的用法示例。


在下文中一共展示了CheckoutSelectionView.as_view方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: import

# 需要导入模块: from shop.views.checkout import CheckoutSelectionView [as 别名]
# 或者: from shop.views.checkout.CheckoutSelectionView import as_view [as 别名]
from django.conf.urls import patterns, url
from shop.util.decorators import cart_required

from shop.views.checkout import (
    CheckoutSelectionView,
    PaymentBackendRedirectView,
    ShippingBackendRedirectView,
    OrderConfirmView,
    ThankYouView,
)

urlpatterns = patterns('',
    url(r'^$', cart_required(CheckoutSelectionView.as_view()),
        name='checkout_selection'  # first step of the checkout process
        ),
    url(r'^ship/$', ShippingBackendRedirectView.as_view(),
        name='checkout_shipping'  # second step of the checkout process
        ),
    url(r'^confirm/$', OrderConfirmView.as_view(),
        name='checkout_confirm'  # third step of the checkout process
        ),
    url(r'^pay/$', PaymentBackendRedirectView.as_view(),
        name='checkout_payment'  # fourth step of the checkout process
        ),
    url(r'^thank_you/$', ThankYouView.as_view(),
        name='thank_you_for_your_order'  # final step of the checkout process
        ),
    )
开发者ID:AirLee,项目名称:django-shop,代码行数:30,代码来源:checkout.py

示例2: url

# 需要导入模块: from shop.views.checkout import CheckoutSelectionView [as 别名]
# 或者: from shop.views.checkout.CheckoutSelectionView import as_view [as 别名]
    
    # Cart
    url(r'^cart/delete/$', CartDetails.as_view(action='delete'), # DELETE 
        name='cart_delete'),
    url('^cart/item/$', CartDetails.as_view(action='post'), # POST
        name='cart_item_add' ),
    url(r'^cart/$', CartDetails.as_view(), name='cart'), # GET
    url(r'^cart/update/$', CartDetails.as_view(action='put'), 
        name='cart_update'),

    # CartItems
    url('^cart/item/(?P<id>[0-9A-Za-z-_.//]+)$', CartItemDetail.as_view(),
        name='cart_item' ),
    
    # Checkout
    url(r'^checkout/$', CheckoutSelectionView.as_view(), 
        name='checkout_selection' # First step of the checkout process
        ),
    #url(r'^checkout/ship/$', SelectShippingView.as_view(), 
    #    name='checkout_shipping' # First step of the checkout process
    #    ),
    url(r'^checkout/ship/$', ShippingBackendRedirectView.as_view(), 
        name='checkout_shipping' # First step of the checkout process
        ),
    #url(r'^checkout/pay/$', SelectPaymentView.as_view(), 
    #    name='checkout_payment' # Second step of the checkout process
    #    ),
    url(r'^checkout/pay/$', PaymentBackendRedirectView.as_view(), 
        name='checkout_payment' # First step of the checkout process
        ),
    url(r'^checkout/thank_you/$', ThankYouView.as_view(), 
开发者ID:AlexHill,项目名称:django-shop,代码行数:33,代码来源:urls.py


注:本文中的shop.views.checkout.CheckoutSelectionView.as_view方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。