示例#1
0
 #url(r'^accounts/login/$', RedirectView.as_view(url='/login')),
 url(r'^accounts/$', RedirectView.as_view(url='/account')),
 url(r'^account/',
     include(("accounts.urls", "accounts"), namespace='account')),
 url(r'^accounts/', include("accounts.passwords.urls")),
 url(r'^address/$', RedirectView.as_view(url='/addresses')),
 url(r'^addresses/$', AddressListView.as_view(), name='addresses'),
 url(r'^addresses/create/$',
     AddressCreateView.as_view(),
     name='address-create'),
 url(r'^addresses/(?P<pk>\d+)/$',
     AddressUpdateView.as_view(),
     name='address-update'),
 url(r'^analytics/sales/$', SalesView.as_view(), name='sales-analytics'),
 url(r'^analytics/sales/data/$',
     SalesAjaxView.as_view(),
     name='sales-analytics-data'),
 url(r'^contact/$', contact_page, name='contact'),
 url(r'^login/$', LoginView.as_view(), name='login'),
 url(r'^checkout/address/create/$',
     checkout_address_create_view,
     name='checkout_address_create'),
 url(r'^checkout/address/reuse/$',
     checkout_address_reuse_view,
     name='checkout_address_reuse'),
 url(r'^register/guest/$',
     GuestRegisterView.as_view(),
     name='guest_register'),
 url(r'^logout/$', LogoutView.as_view(), name='logout'),
 url(r'^api/cart/$', cart_detail_api_view, name='api-cart'),
 url(r'^cart/', include(("carts.urls", "carts"), namespace='cart')),
示例#2
0
from addresses.views import checkout_address_create_view, checkout_address_reuse_view
from analytics.views import SalesView, SalesAjaxView
from marketing.views import MarketingPreferenceUpdateView, MailchimpWebhookView
from orders.views import LibraryView

urlpatterns = [
    url(r'^$', home_page, name='home'),
    url(r'^about/$', about_page , name='about'),
    # url(r'^accounts/login/$', RedirectView.as_view(url='/login')),
    url(r'^accounts/$', RedirectView.as_view(url='/account')),
    url(r'^account/',include('accounts.urls',namespace='account')),
    url(r'^accounts/',include('accounts.passwords.urls')), # overriding django password urls
    url(r'^contact/$', contact_page, name='contact'),
    url(r'^login/$', LoginView.as_view()  , name='login'),
    url(r'^analytics/sales/$', SalesView.as_view()  , name='sales-analytics'),
    url(r'^analytics/sales/data/$', SalesAjaxView.as_view()  , name='sales-analytics-data'),
    url(r'^checkout/address/create/$', checkout_address_create_view, name='checkout_address_create'),
    url(r'^checkout/address/reuse/$', checkout_address_reuse_view, name='checkout_address_reuse'),
    url(r'^register/guest$',GuestRegisterView.as_view() , name='guest_register'),
    url(r'^logout/$', LogoutView.as_view() , name='logout'),
    url(r'^api/cart/$', cart_detail_api_view , name='api-cart'),
    url(r'^cart/',include('carts.urls',namespace='cart')),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^billing/payment-method/$', payment_method_view, name='payment-method'),
    url(r'^billing/payment-method/create/$', payment_method_createview, name='payment-method-endpoint'),
    url(r'^bootstrap/$', TemplateView.as_view(template_name='bootstrap/example.html')),
    url(r'^library/$', LibraryView.as_view(), name='library'),
    url(r'^orders/',include('orders.urls',namespace='orders')),
    url(r'^products/',include('products.urls',namespace='products')),
    url(r'^search/',include('search.urls',namespace='search')),
    url(r'^settings/email/$', MarketingPreferenceUpdateView.as_view(), name='marketing-pref'),
示例#3
0
    path('search/', include('search.urls', namespace='search')),
    ## address
    path('accounts/address', addess_create, name='address'),
    path('accounts/address_choose', address_choose, name='address_choose'),
    path('api/cart/', cart_refresh, name='cart_refresh'),
    re_path(r'^addresses/$', AddressListView.as_view(), name='addresses'),
    re_path(r'^addresses/create/$', AddressCreateView.as_view(), name='address-create'),
    re_path(r'^addresses/(?P<pk>\d+)/$', AddressUpdateView.as_view(), name='address-update'),
    ##billing
    path('payment-card/',payment_card, name='payment_card'),
    path('payment-card-create/',payment_card_create, name='payment_card_create'),
    re_path(r'^choose-payment-method/$', payment_choose, name='payment_choose'),
    re_path(r'^change-payment-method/$', payment_method_change, name='payment_method_change'),


    ##marketing
    path('subscribe/',subscribe, name='subscribe'),
    path('subscription/',MarketingPreferenceView.as_view(), name='subscription'),
    path('webhooks/email/',MailchimpWebhooView.as_view(), name='mailchimpwebhook'),
    path('analytics/sales/',SalesView.as_view(), name='sales-report'),
    path('analytics/sales/data/', SalesAjaxView.as_view(), name='sales-analytics-data'),

    ##orders
    path('orders/', include('orders.urls', namespace='orders')),

 ]

if settings.DEBUG:
    urlpatterns = urlpatterns + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns = urlpatterns + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
示例#4
0
from .views import home_page, about_page, contact_page

urlpatterns = [
    url(r'^$', home_page, name='home'),
    url(r'^about/$', about_page, name='about'),
    #url(r'^accounts/login/$', RedirectView.as_view(url='/login')),
    url(r'^accounts/$', RedirectView.as_view(url='/account')),
    url(r'^account/', include("accounts.urls", namespace='account')),
    url(r'^accounts/', include("accounts.passwords.urls")),
    url(r'^address/$', RedirectView.as_view(url='/addresses')),
    url(r'^addresses/$', AddressListView.as_view(), name='addresses'),
    url(r'^addresses/create/$', AddressCreateView.as_view(), name='address-create'),
    url(r'^addresses/(?P<pk>\d+)/$', AddressUpdateView.as_view(), name='address-update'),
    url(r'^analytics/sales/$', SalesView.as_view(), name='sales-analytics'),
    url(r'^analytics/sales/data/$', SalesAjaxView.as_view(), name='sales-analytics-data'),
    url(r'^contact/$', contact_page, name='contact'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^checkout/address/create/$', checkout_address_create_view, name='checkout_address_create'),
    url(r'^checkout/address/reuse/$', checkout_address_reuse_view, name='checkout_address_reuse'),
    url(r'^register/guest/$', GuestRegisterView.as_view(), name='guest_register'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^api/cart/$', cart_detail_api_view, name='api-cart'),
    url(r'^cart/', include("carts.urls", namespace='cart')),
    url(r'^billing/payment-method/$', payment_method_view, name='billing-payment-method'),
    url(r'^billing/payment-method/create/$', payment_method_createview, name='billing-payment-method-endpoint'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^bootstrap/$', TemplateView.as_view(template_name='bootstrap/example.html')),
    url(r'^library/$', LibraryView.as_view(), name='library'),
    url(r'^orders/', include("orders.urls", namespace='orders')),
    url(r'^products/', include("products.urls", namespace='products')),
示例#5
0
    path('products/', include('products.urls', namespace='products')),
    path('search/', include('search.urls', namespace='search')),
    # path('products/', ProductListView.as_view()),
    # path('products-fbv/', product_list_view),
    # # path('products/<int:pk>/', ProductDetailView.as_view()),
    # path('products-fbv/<int:pk>/', product_detail_view),
    # path('featured/',ProductFeaturedListView.as_view()),
    # path('featured/<int:pk>/',ProductFeaturedDetailView.as_view()),
    # path('products/<slug:slug>/',ProductDetailSlugView.as_view())
    path('settings/email/',
         MarketingPreferencesUpdateView.as_view(),
         name="marketing-pref"),
    path('webhooks/mailchimp/',
         MailchimpWebhookView.as_view(),
         name="webhooks-mailchimp"),
    path('account/', include('accounts.urls', namespace="accounts")),
    path('accounts/', RedirectView.as_view(url="/account")),
    path('account/password',
         include('accounts.passwords.urls', namespace="accounts-password")),
    path('settings/', RedirectView.as_view(url="/account")),
    path('orders/', include('orders.urls', namespace="orders")),
    path('library/', LibraryView.as_view(), name="library"),
    path('analytics/sales/', SalesView.as_view(), name="sales"),
    path('analytics/sales/data/', SalesAjaxView.as_view(), name="sales-data"),
]

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