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)
from django.conf.urls import url from orders.views import AddressSelectFormView, UserAddressCreateView from .views import CheckoutView, CheckoutFinalView urlpatterns = [ url(r'^$', CheckoutView.as_view(), name='checkout'), url(r'^final/$', CheckoutFinalView.as_view(), name='checkout_final'), url(r'^address/$', AddressSelectFormView.as_view(), name='order_address'), url(r'^address/add/$', UserAddressCreateView.as_view(), name='order_address_create'), ]
# 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)
url(r'^admin/', admin.site.urls), url(r'^', include('newsletter.urls', namespace='newsletter')), 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/$',
# 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)
from django.conf.urls import url from .views import CartCreateView,CartDetailView,CheckoutView from orders.views import AddressFormView, UserAddressCreateView, ConfirmOrderView, OrdersList app_name='cart' urlpatterns = [ url(r'^$', CartCreateView.as_view(), name='create_cart'), url(r'^view/$', CartDetailView.as_view(), name='cart_detail'), url(r'^checkout/$', CheckoutView.as_view(), name='cart_checkout'), 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'), ]