Пример #1
0
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin

from carts.views import CartView, ItemCountView, CheckoutView, CheckoutFinalView
from orders.views import AddressSelectFormView, UserAddressCreateView, OrderList, OrderDetail
urlpatterns = [
	# 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'^categories/', include('products.urls_categories')),
	url(r'^orders/$', OrderList.as_view(), name='orders'),
	url(r'^orders/(?P<pk>\d+)/$', OrderDetail.as_view(), name='order_detail'),
	url(r'^cart/$', CartView.as_view(), name='cart'),
	url(r'^cart/count/$', ItemCountView.as_view(), name='item_count'),
	url(r'^checkout/$', CheckoutView.as_view(), name='checkout'),
	url(r'^checkout/address/$', AddressSelectFormView.as_view(), name='order_address'),
	url(r'^checkout/address/add/$', UserAddressCreateView.as_view(), name='user_address_create'),
	url(r'^checkout/final/$', CheckoutFinalView.as_view(), name='checkout_final'),
] 
if settings.DEBUG:
	urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
	urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Пример #2
0
from orders.views import(
    AddressSelectFormView,
    UserAdressCreateView,
    OrderList,
    OrderDetail
)
from products import views

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'teams.views.home', name='home'),
    url(r'^form/','teams.views.form',name='form'),
    url(r'^accounts/', include('registration.urls')),
    url(r'^pro/', include('products.urls')),
    url(r'^categories/', include('products.urls_categories')),
    url(r'^cart/$',CartView.as_view(),name='cartt'),
    url(r'^cart/count/$',ItemCountView.as_view(),name='item_count'),
    url(r'^checkout/$',CheckoutView.as_view(),name='checkout'),
    url(r'^checkout/address/$', AddressSelectFormView.as_view(), name='order_address'),
    url(r'^checkout/address/add/$', UserAdressCreateView.as_view(), name='user_address_create'),
    url(r'^checkout/final/$', CheckoutFinalView.as_view(), name='checkout_final'),
    url(r'^orders/$', OrderList.as_view(), name='orders'),
    url(r'^orders/(?P<pk>\d+)/$', OrderDetail.as_view(), name='order_detail'),
    url(r'^change-language/$',views.change_language,name='change-language'),

]
if settings.DEBUG :
    urlpatterns += static(settings.STATIC_URL,document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
    urlpatterns += staticfiles_urlpatterns()
Пример #3
0
urlpatterns = [
    # Examples:
    url(r'^$', 'newsletter.views.home', name='home'),
    url(r'^contact/$', 'newsletter.views.contact', name='contact'),
    url(r'^about/$', 'ecommerce.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'^categories/', include('products.urls_categories')),
    url(r'^orders/$', OrderList.as_view(), name='orders'),
    url(r'^orders/(?P<pk>\d+)/$', OrderDetail.as_view(), name='order_detail'),
    url(r'^cart/$', CartView.as_view(), name='cart'),
    url(r'^cart/count/$', ItemCountView.as_view(), name='item_count'),
    url(r'^checkout/$', CheckoutView.as_view(), name='checkout'),
    url(r'^checkout/address/$',
        AddressSelectFormView.as_view(),
        name='order_address'),
    url(r'^checkout/address/add/$',
        UserAddressCreateView.as_view(),
        name='user_address_create'),
    url(r'^checkout/final/$',
        CheckoutFinalView.as_view(),
        name='checkout_final'),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Пример #4
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', namespace="products")),
    url(r'^categories/',
        include('products.urls_categories', namespace="categories")),
    url(r'^orders/$', OrderListView.as_view(), name='orders'),
    url(r'^orders/(?P<pk>\d+)/$',
        OrderDetailView.as_view(), name='order_detail'),
    url(r'^cart/$', CartView.as_view(), name='cart'),
    url(r'^cart/count/$', ItemCountView.as_view(), name='item_count'),
    url(r'^checkout/$', CheckoutView.as_view(), name='checkout'),
    url(r'^checkout/address/$',
        AddressSelectFormView.as_view(), name='order_address'),
    url(r'^checkout/address/add/$', UserAddressCreateView.as_view(),
        name='user_address_create'),
    url(r'^checkout/final/$', CheckoutFinalView.as_view(),
        name='checkout_final'),
]

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Пример #5
0
    url(r'^accounts/', include('registration.backends.default.urls')),
    url(r'^products/', include('products.urls', namespace='products')),
    url(r'^categories/', include(
        'products.urls_categories', namespace='categories')),
    url(r'^orders/$', OrderList.as_view(), name='orders'),
    url(r'^orders/(?P<pk>[0-9]+)/$',
        OrderDetail.as_view(), name='order_detail'),
    url(r'^cart/$', CartView.as_view(), name='cart'),
    url(r'^cart/count/$', ItemCountView.as_view(), name='item_count'),
    url(r'^checkout/$', CheckoutView.as_view(), name='checkout'),
    url(r'^checkout/address/$',
        AddressSelectFormView.as_view(), name='order_address'),
    url(r'^checkout/address/add/$',
        UserAddressCreateView.as_view(), name='user_address_create'),
    url(r'^checkout/final/$',
        CheckoutFinalView.as_view(), name='checkout_final'),

]


# API Patterns
urlpatterns += [
    url(r'^api/$', APIHomeView.as_view(), name='home_api'),
    url(r'^api/cart/$', CartAPIView.as_view(), name='cart_api'),
    url(r'^api/checkout/$', CheckoutAPIView.as_view(), name='checkout_api'),
    url(r'^api/auth/token/$', obtain_jwt_token),
    url(r'^api/auth/token/refresh/$', refresh_jwt_token),

    url(r'^api/user/address/$',
        UserAddressListAPIView.as_view(), name='user_address_list_api'),
    url(r'^api/user/address/create/$',
Пример #6
0
    url(r'^products/$',
        ProductListView.as_view(), name = "products_list_view"),
    url(r'^create/product$',
        ProductCreateView.as_view(), name = "products_create_view"),
    url(r'^update/product/(?P<pk>\d+)$',
        ProductUpdateView.as_view(), name = "products_update_view"),
    url(r'^delete/product/(?P<pk>\d+)$',
        ProductDeleteView.as_view(), name = "products_delete_view"),
    url(r'^products/(?P<pk>\d+)$',
        ProductDetailView.as_view(), name = "products_detail_view"),
    url(r'^products/(?P<slug>[\w-]+)$',
        ProductDetailView.as_view(), name = "products_slug_view"),

    url(r'^cart/$', CartView.as_view(), name = "cart"),

    url(r'^orders/$', OrderList.as_view(), name = "orders"),
    url(r'^orders/(?P<pk>\d+)$', OrderDetail.as_view(), name = "order_detail"),

    url(r'^checkout/$', CheckoutView.as_view(), name = "checkout"),
    url(r'^checkout/address/$',
        AddressSelectFormView.as_view(), name = "address_form"),
    url(r'^checkout/address/add$',
        UserAddressCreateView.as_view(), name = "user_address_create"),
    url(r'^checkout/final/$',
        CheckoutFinalView.as_view(), name = "checkout_final"),
]

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