Esempio n. 1
0
from django.urls import path

from cart.views import CartView, OrderDetailView

urlpatterns = [
    path('', CartView.as_view()),
    path('/<int:cart_id>', CartView.as_view()),
    path('/checkout', OrderDetailView.as_view()),
]
Esempio n. 2
0
                    

urlpatterns = [
    # Examples:
    url(r'^$', home, name='home'),
    url(r'^contact/$', contact, name='contact'),
    url(r'^about/$', 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'),
    url(r'^consulta/$', ReporteProductos, name='reporte_productos'),
    url(r'^ventasdia/$', VentasDia, name='reporte_ventas'),
    url(r'^imprimirventas/$',imprimir_ventas,name='imprimir_ventas'),
    url(r'^practicas/$',practicas,name='practicas_reportlab    '),


]

if settings.DEBUG:
	urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Esempio n. 3
0
from django.urls import path
from cart.views import AddView, CartView, UpdateView, DeleteView

urlpatterns = [
    path('add', AddView.as_view(), name='add'),  # 购物车的商品添加操作
    path('update', UpdateView.as_view(), name='update'),  # 修改商品数量
    path('delete', DeleteView.as_view(), name='delete'),  # 删除商品
    path('', CartView.as_view(), name='center'),  # 购物车页面
]
Esempio n. 4
0
from django.conf.urls import url

from cart.views import CartView, CartAjaxView

urlpatterns = [
    url(r'^$', CartView.as_view(), name='list'),
    url(r'^ajax/$', CartAjaxView.as_view(), name='ajax'),
]
Esempio n. 5
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 cart.views import CartView


urlpatterns = [
    # Examples:
    url(r'^$', 'newsletter.views.home', name='home'),
    url(r'^contact/$', 'newsletter.views.contact', name='contact'),
    url(r'^about/$', 'ecom.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'^cart/$', CartView.as_view(), name='cart'),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
]

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. 6
0
from django.urls import path
from . import views
from cart.views import CartView


urlpatterns = [

    path('', CartView.as_view(), name='cart_view'),
    path('add/<item_id>/', views.add_to_cart, name='add_to_cart'),
    path('adjust/<item_id>/', views.adjust_cart, name='adjust_cart'),
    path('remove/<item_id>/', views.remove_from_cart, name='remove_from_cart'),

]
Esempio n. 7
0
    RegistryView, )
from login.views import (
    LoginView, )
from customer.views import (
    CustomerAccountView, )
from search.views import (SearchResultView)

urlpatterns = [
    path('', BasicView.as_view(), name='base'),
    path('products/<str:slug>/',
         ProductDetailView.as_view(),
         name='product_detail'),
    path('category/<str:slug>/',
         CategoryDetailView.as_view(),
         name='category_detail'),
    path('cart/', CartView.as_view(), name='cart'),
    path('add-to-cart/<str:slug>/',
         AddToCartView.as_view(),
         name='add_to_cart'),
    path('remove-from-cart/<str:slug>/',
         DeleteFromCartView.as_view(),
         name='delete_from_cart'),
    path('change-qty/<str:slug>/',
         ChangeQuantityView.as_view(),
         name='change_qty'),
    path('checkout/', CheckoutView.as_view(), name='checkout'),
    path('order/', MakeOrderView.as_view(), name='make_order'),
    path('contacts/', ContactsView.as_view(), name='contacts'),
    path('delivery/', DeliveryView.as_view(), name='delivery'),
    path('registry/', RegistryView.as_view(), name='registry'),
    path('login/', LoginView.as_view(), name='login'),
Esempio n. 8
0
"""
URL configuration for home app
"""
from django.urls import path

from cart.views import CartView

app_name = 'cart'
urlpatterns = [
    path('', CartView.as_view(), name="cart"),
]
from django.urls import path

from cart.views import CartView

urlpatterns = [
    path('', CartView.as_view(), name="cartview"),
    path('add/', CartView.as_view(), name="cartadd"),
    path('remove/', CartView.as_view(), name='cartremove'),
]
Esempio n. 10
0
from django.contrib import admin
from django.urls import include, path
from rest_framework import routers
from rest_framework_simplejwt import views as jwt_views

from cart.views import CartView, ClearCartView, UserCartView
from item.views import ItemViewSet

router = routers.DefaultRouter()
router.register("item", ItemViewSet)

urlpatterns = [
    path("api/", include(router.urls)),
    path("admin/", admin.site.urls),
    path("api/auth/", include("dj_rest_auth.urls")),
    path("api/auth/registration/", include("dj_rest_auth.registration.urls")),
    path(
        "api/auth/token/refresh/",
        jwt_views.TokenRefreshView.as_view(),
        name="auth.refresh",
    ),
    path("api/cart/", CartView.as_view(), name="cart.cart"),
    path("api/usercart/", UserCartView.as_view(), name="cart.usercart"),
    path("api/usercart/deleteall/",
         ClearCartView.as_view(),
         name="cart.deleteall"),
]
Esempio n. 11
0
from django.conf.urls import url
from cart.views import CartView, CartAddView, CartUpdateView, CartDelView

urlpatterns = [
    url(r'^add$', CartAddView.as_view(), name='cart_add'),
    url(r'^update$', CartUpdateView.as_view(), name='cart_update'),
    url(r'^del$', CartDelView.as_view(), name='cart_del'),
    url(r'^$', CartView.as_view(), name='cart_show'),
]
Esempio n. 12
0
from django.conf.urls import url

from cart.views import CartReduceView, CartView, ShopAddView

urlpatterns = [
    url(r'^add/$', ShopAddView.as_view(), name="add"),
    url(r'^$', CartView.as_view(), name="cart"),
    url(r'^reduce/$', CartReduceView.as_view(), name="reduce"),
]
Esempio n. 13
0
from django.conf.urls import url, include

from cart.views import CartAddView, CartView, CartUpdateView, CartDeleteView

urlpatterns = [
    url(r"^add$", CartAddView.as_view(), name="add"),  # 购物车记录添加
    url(r"^$", CartView.as_view(), name="cart"),  # 购物车记录添加
    url(r"^update$", CartUpdateView.as_view(), name="update"),  # 购物车记录更新
    url(r"^delete$", CartDeleteView.as_view(), name="delete"),  # 购物车记录删除
]
Esempio n. 14
0
from django.conf.urls.defaults import patterns, include, url

from cart.views import CartView, CartAddView, CartSetView, CartRemoveView, CartOrderView

urlpatterns = patterns('',
	url(r'^$', CartView.as_view()),
	url(r'^add/$', CartAddView.as_view()),
	url(r'^remove/$', CartRemoveView.as_view()),
	url(r'^set/$', CartSetView.as_view()),
	url(r'^order/$', CartOrderView.as_view()),
)
Esempio n. 15
0
"""dailyfresh URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from cart.views import CartView, CartInfoView, CartUpdateView, CartDeleteView

app_name = 'cart'

urlpatterns = [
    path('', CartInfoView.as_view(), name="show"),  # 购物车页面显示
    path('add', CartView.as_view(), name="add"),  # 添加购物车
    path('update', CartUpdateView.as_view(), name="update"),  # 购物车记录更新
    path('delete', CartDeleteView.as_view(), name="delete"),  # 购物车记录删除
]