Ejemplo n.º 1
0
from django.conf.urls import url, include

from . import views
from orders.views import AddressFormView, UserAddressCreateView, ConfirmOrderView, OrdersList

urlpatterns = [
    url(r'^$', views.CartCreateView.as_view(), name='create_cart'),
    url(r'^view/$', views.CartDetailView.as_view(), name='cart_detail'),
    url(r'^deco_detail/$',
        views.HomeDecoDetailView.as_view(),
        name='deco_detail'),
    url(r'^const_detail/$', views.const_detail, name='const_detail'),
    url(r'^elect_detail/$', views.elect_detail, name='elect_detail'),
    url(r'^art_detail/$', views.art_detail, name='art_detail'),
    url(r'^viewpay/$',
        views.CartDetailPayView.as_view(),
        name='cart_detail_pay'),
    url(r'^charge/$', views.charge, name='charge'),
    url(r'^address/$', AddressFormView.as_view(), name='address'),
    url(r'^address/add/$', UserAddressCreateView.as_view(),
        name='add_address'),
    url(r'^address/confirm/$',
        ConfirmOrderView.as_view(),
        name='confirm_order'),
    url(r'^orders/$', OrdersList.as_view(), name='order_list'),
    #url(r'^accounts/', include('registration.backends.default.urls')),
]
Ejemplo n.º 2
0
    # Examples:
    url(r'^$', 'newsletter.views.home', name='home'),
    url(r'^contact/$', 'newsletter.views.contact', name='contact'),
    url(r'^about/$', 'ecommerce2.views.about', name='about'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('registration.backends.default.urls')),
    url(r'^products/', include('products.urls')),
    url(r'^today/$', 'today.views.home', name="todayhome"),
    url(r'^formset/$', 'today.views.formsetview', name="formset"),
    url(r'^modelform/$', 'today.views.modelform', name="modelform"),
    url(r'^modelformfactory/$',
        'today.views.modelformfactory',
        name="modelformfactory"),
    url(r'^categories/', include('products.urls_categories')),
    url(r'^cart/$', CartView.as_view(), name='cartview'),
    url(r'^cart/count/$', CartItemCount.as_view(), name='cartcountview'),
    url(r'^checkout/$', CheckOutView.as_view(), name='checkout'),
    url(r'^checkout/address/$',
        AddressFormView.as_view(),
        name='order_address'),
    url(r'^checkout/address/add$',
        UserAddressCreateView.as_view(),
        name='create_address'),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)