Esempio n. 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)
Esempio n. 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()
Esempio n. 3
0
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings
from carts.views import CheckoutView
from orders.views import AddressSelectFormView, UserAddressCreateView, CheckoutFinalView

urlpatterns = [
	url(r'^$', CheckoutView.as_view(), name='checkout_view'),
    url(r'^address/$', AddressSelectFormView.as_view(), name='order_address'),
    url(r'^address/add/$', UserAddressCreateView.as_view(), name='user_address_create'),
    url(r'^final/$', CheckoutFinalView.as_view(), name='checkout_final'),
]
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'newsletter.views.home', name='home'),
    url(r'^contact/', 'newsletter.views.contact', name='contact'),
    url(r'^message_submitted/',
        'newsletter.views.message_submitted',
        name='contact_us_submitted'),
    url(r'^sign-up-successful/',
        'newsletter.views.sign_up_successful',
        name='sign_up_successful'),
    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'^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 URLS
    url(r'^api/auth/token/$', 'rest_framework_jwt.views.obtain_jwt_token'),
    url(r'^api/$', APIHomeView.as_view(), name="home_api"),
    url(r'^api/categories/$',
        CategoryListAPIView.as_view(),
Esempio n. 5
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
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 = [
    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'^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)