from django.conf.urls import patterns, url from django.views.generic import RedirectView from .views import * urlpatterns = patterns('', url(r'^$', RedirectView.as_view( url='/', permanent=True), name='store_index'), url(r'^cart/$', CartDetailView.as_view(), name='store_cart_detail'), url(r'^search/$', CategoryView.as_view(is_search=True), name='store_search'), url(r'^leaders/$', CategoryView.as_view(is_leaders=True), name='store_leaders'), url(r'^sale/$', CategoryView.as_view(is_sale=True), name='store_sale'), url(r'^cart/add/$', CartAddView.as_view( permanent=False), name='store_cart_add'), url(r'^cart/remove/$', CartRemoveView.as_view( permanent=False), name='store_cart_remove'), url(r'^(?P.+)/product-(?P.+)/$', ProductView.as_view(), name='store_product'), url(r'^(?P.+)/$', CategoryView.as_view(), name='store_category'), )