示例#1
0
                    '(?P<slug>[0-9A-Za-z-_.//]+)'),
    ])

if scs.HAS_MANUFACTURERS:
    pats.extend([
        catalog_url('manufacturer', ManufacturerListView.as_view(),
                    'manufacturer_list'),
        catalog_url('manufacturer', ManufacturerDetailView.as_view(),
                    'manufacturer_detail', '(?P<slug>[0-9A-Za-z-_.//]+)'),
    ])


if 'catalog.reviews' in settings.INSTALLED_APPS:
    from catalog.reviews.urls import pats as reviews_pats
    pats.extend(reviews_pats)


# Main patterns.
pats.extend([
    catalog_url('product', ProductListView.as_view(), 'product_list'),
    catalog_url('product', ProductVariantsJSONView.as_view(),
                'product_variants', '(?P<slug>[0-9A-Za-z-_.//]+)/variants/'),
    catalog_url('product', ProductDetailView.as_view(), 'product_detail',
                '(?P<slug>[0-9A-Za-z-_.//]+)'),

    url(r'^$', ShopTemplateView.as_view(
        template_name='shop/welcome.html'), name='shop_welcome'),
])

urlpatterns = patterns('', *pats)
示例#2
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url

from shop.views import ShopTemplateView


urlpatterns = patterns('',
    url(r'^$', ShopTemplateView.as_view(template_name="shop/welcome.html"),
        name='shop_welcome'),
    (r'^pay/', include('shop.payment.urls')),
    (r'^ship/', include('shop.shipping.urls')),
    (r'^orders/', include('shop.urls.order')),
    (r'^checkout/', include('shop.urls.checkout')),
    (r'^cart/', include('shop.urls.cart')),
    (r'^products/', include('webshop.urls.catalog')),
    )
示例#3
0
# -*- coding: utf-8 -*-
from django.conf.urls import include, url

from shop.views import ShopTemplateView


urlpatterns = [
    url(r'^$', ShopTemplateView.as_view(template_name="shop/welcome.html"),
        name='shop_welcome'),
    (r'^pay/', include('shop.urls.payment')),
    (r'^ship/', include('shop.urls.shipping')),
    (r'^orders/', include('shop.urls.order')),
    (r'^checkout/', include('shop.urls.checkout')),
    (r'^cart/', include('shop.urls.cart')),
    (r'^products/', include('shop.urls.catalog')),
]