Exemplo n.º 1
0
from django.urls import path

from order import views
from order.views import OrderListView, OrderCreateView, OrderUpdateView

app_name = 'order'

urlpatterns = [
    path('', OrderListView.as_view(), name='list'),
    path('add/', OrderCreateView.as_view(), name='add'),
    path('update/<int:pk>/', OrderUpdateView.as_view(), name='update'),
    path('delete/<int:pk>/', views.order_delete, name='delete'),
]
Exemplo n.º 2
0
from django.urls import path

from order.views import OrderListView, OrderCreateView, OrderRetrieveAPIView, OrderProcessView, TestPayView

urlpatterns = [
    path('', OrderListView.as_view(), name="order_list"),
    path('create/', OrderCreateView.as_view(), name="order_create"),
    path('<int:pk>/', OrderRetrieveAPIView.as_view(), name="order_info"),
    path('<int:order>/process/',
         OrderProcessView.as_view(),
         name="order_process"),
    path('pay/', TestPayView.as_view(), name="alipay_notify")
]
Exemplo n.º 3
0
from django.urls import path

from order import views
from order.views import (OrderUpdateView, CreateOrderView, delete_order,
                         OrderListView, done_order_view,
                         auto_create_order_view, ajax_add_product,
                         ajax_modify_order_item, ajax_search_products,
                         ajax_calculate_results_view, order_action_view,
                         ajax_calculate_category_view, GoodTableView, Invoice)

urlpatterns = [
    path('order-list/', OrderListView.as_view(), name='order_list'),
    path('create/', CreateOrderView.as_view(), name='create-order'),
    path('create-auto/', auto_create_order_view, name='create_auto'),
    path('update/<int:pk>/', OrderUpdateView.as_view(), name='update_order'),
    path('done/<int:pk>/', done_order_view, name='done_order'),
    path('delete/<int:pk>/', delete_order, name='delete_order'),
    path('action/<int:pk>/<slug:action>/',
         order_action_view,
         name='order_action'),
    path('delete/<int:pk>/', delete_order, name='delete_order'),
    path('Good-note/<int:pk>/', GoodTableView.as_view(), name='grnote'),
    path('Invoice/<int:pk>/', Invoice.as_view(), name='invoice'),

    #ajax
    path('ajax/search-products/<int:pk>/',
         ajax_search_products,
         name='ajax-search'),
    path('ajax/add-product/<int:pk>/<int:dk>/',
         ajax_add_product,
         name='ajax_add'),
Exemplo n.º 4
0
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 djuser.views import index, RegisterView, LoginView, logout
from product.views import ProductList, ProductCreate, ProductDetail, ProductListAPI, ProductDetailAPI
from order.views import OrderCreateView, OrderListView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', index),
    path('register/', RegisterView.as_view()),
    path('login/', LoginView.as_view()),
    path('logout/', logout),
    path('product/', ProductList.as_view()),
    path('product/<int:pk>/', ProductDetail.as_view()),
    path('product/create/', ProductCreate.as_view()),
    path('order/create/', OrderCreateView.as_view()),
    path('order/', OrderListView.as_view()),
    path('api/product/', ProductListAPI.as_view()),
    path('api/product/<int:pk>', ProductDetailAPI.as_view())
]
Exemplo n.º 5
0
from django.conf.urls import url

from order.views import OrderCreateView, OrderUpdateRetrieveDeleteView, OrderListView, OrderListByDriverView, OrderListByTruckView

app_name = 'order'

urlpatterns = [
    url(r'create',
        OrderCreateView.as_view({'post': 'create'}),
        name='order_create'),
    url(r'(?P<pk>\d+)/update_retrieve_delete',
        OrderUpdateRetrieveDeleteView.as_view({
            'put': 'update',
            'get': 'retrieve',
            'delete': 'destroy'
        }),
        name='order_update_retrieve_delete'),
    url(r'list/byDriver',
        OrderListByDriverView.as_view({'get': 'list'}),
        name='order_list_by_driver'),
    url(r'list/byTruck',
        OrderListByTruckView.as_view({'get': 'list'}),
        name='order_list_by_truck'),
    url(r'list', OrderListView.as_view({'get': 'list'}), name='order_list'),
]
Exemplo n.º 6
0
from django.urls import path

from order.views import OrderListView, OrderView, create_orders

# prefix order/
urlpatterns = [
    path('', OrderListView.as_view()),
    path('<int:pk>/', OrderView.as_view()),
    path('many/', create_orders),
]
Exemplo n.º 7
0
from django.urls import path

from order.views import OrderListView

app_name = 'order'

urlpatterns = [path('', OrderListView.as_view(), name='list')]
Exemplo n.º 8
0
from django.urls import path


from order.views import OrderUpdateView, OrderDeleteView, OrderListView, OrderDetailView, OrderCreateView, cart, \
    updateItem, PurchaseDetailView, PurchaseDeleteView, PurchaseListView

app_name = "order"

urlpatterns = [
    path("", OrderListView.as_view(), name="list"),
    path("create/", OrderCreateView.as_view(), name="create"),
    path("<int:pk>/", OrderDetailView.as_view(), name="detail"),
    path("<int:pk>/update/", OrderUpdateView.as_view(), name="update"),
    path("<int:pk>/delete/", OrderDeleteView.as_view(), name="delete"),
    path("cart/", cart, name="cart"),
    path("update_item/", updateItem, name="update_item"),
    path("<int:pk>/", PurchaseDetailView.as_view(), name="detail"),
    path("delete/<int:pk>/", PurchaseDeleteView.as_view(), name="delete"),
    path("", PurchaseListView.as_view(), name="list"),
]
from django.contrib import admin
from django.urls import path
from customer.views import index, JoinView, LoginView, logout, CustomerListApiView, CustomerApiView
from order.views import OrderAddView, OrderListView, OrderListApiView, OrderApiView
from product.views import ProductListView, ProductAddView, ProductView, ProductListApiView, ProductApiView

urlpatterns = [
    path("s/a/console/", admin.site.urls),
    path('', index),
    path("join/", JoinView.as_view()),
    path("login/", LoginView.as_view()),
    path("logout/", logout),
    path("product/", ProductListView.as_view()),
    path("product/add", ProductAddView.as_view()),
    path("product/<int:pk>", ProductView.as_view()),
    path("order/", OrderListView.as_view()),
    path("order/add", OrderAddView.as_view()),
    path("api/product", ProductListApiView.as_view()),
    path("api/product/<int:pk>", ProductApiView.as_view()),
    path("api/customer", CustomerListApiView.as_view()),
    path("api/customer/<int:pk>", CustomerApiView.as_view()),
    path("api/order", OrderListApiView.as_view()),
    path("api/order/<int:pk>", OrderApiView.as_view()),
]
Exemplo n.º 10
0
from goods.views import AutoFollowView
from goods.views import GoodsListView, GoodsSpiderView, ModifyGoodsView, SingleGoodsListView
from order.views import OrderListView, IndexView, OrderSpiderView, BuyGoodsView, ModifyPurchaseView
from order.views import StockView, StockListView, OrderChartsView, OrderInfoView, OrderWaybillView
from order.views import BaleOrderView, CheckIncomeView, CheckOrderView

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('xadmin/', xadmin.site.urls),

    path('goods/list/', GoodsListView.as_view(), name='goods_list'),                # 商品列表 get页面 post数据
    path('modify/good/', ModifyGoodsView.as_view(), name='modify_good'),            # 修改商品数据
    path('goodsku/list/', SingleGoodsListView.as_view(), name='goodsku_list'),      # 单个spu商品 sku列表

    path('order/list/', OrderListView.as_view(), name='order_list'),                # 已完成订单列表 get页面 post数据
    path('order/info/', OrderInfoView.as_view(), name='order_info'),                # 已完成订单详情 修改订单备注信息
    path('order/charts/data', OrderChartsView.as_view(), name='charts_data'),       # 订单统计 图表数据

    path('buy/product/', BuyGoodsView.as_view(), name='buy_product'),               # 采购单列表 创建
    path('modify/purchase/', ModifyPurchaseView.as_view(), name='modify_purchase'), # 采购单修改

    path('finished/purchase/', StockView.as_view(), name='finished_purchase'),      # 入库操作
    path('purchase/list/', StockListView.as_view(), name='purchase_list'),          # 入库单列表 get页面 post数据

    path('get/product/', GoodsSpiderView.as_view(), name='get_product'),            # 抓取商品信息
    path('get/order/', OrderSpiderView.as_view(), name='get_order'),                # 抓取订单信息

    path('order/waybill/', OrderWaybillView.as_view(), name='order_waybill'),       # 生成运单号

    path('bale/order/', BaleOrderView.as_view(), name='bale_order'),                # 打包订单 打印运单号
Exemplo n.º 11
0
from django.urls import path

from order.views import OrderDetailView, OrderCreateView, OrderListView, \
    OrderManageActionView, OrderAssemblingInfoView, OrderBulkDeleteView, \
    OrderStatusCount, ReceiveOrderView

urlpatterns = [
    path('<int:o_id>/', OrderDetailView.as_view()),
    path('create/', OrderCreateView.as_view()),
    path('list/', OrderListView.as_view()),
    path('action/', OrderManageActionView.as_view()),
    path('assemble-info/<int:o_id>/', OrderAssemblingInfoView.as_view()),
    path('delete/', OrderBulkDeleteView.as_view()),
    path('status-count/', OrderStatusCount.as_view()),
    path('receive/', ReceiveOrderView.as_view()),
]
Exemplo n.º 12
0
from goods.views import AutoFollowView
from goods.views import GoodsListView, GoodsSpiderView, ModifyGoodsView, SingleGoodsListView
from order.views import OrderListView, IndexView, OrderSpiderView, BuyGoodsView, ModifyPurchaseView
from order.views import StockView, StockListView, OrderChartsView, OrderInfoView, OrderWaybillView
from order.views import BaleOrderView, CheckIncomeView

urlpatterns = [
    # path('admin/', admin.site.urls),
    path('xadmin/', xadmin.site.urls),
    path('goods/list/', GoodsListView.as_view(),
         name='goods_list'),  # 商品列表 get页面 post数据
    path('modify/good/', ModifyGoodsView.as_view(),
         name='modify_good'),  # 修改商品数据
    path('goodsku/list/', SingleGoodsListView.as_view(),
         name='goodsku_list'),  # 单个spu商品 sku列表
    path('order/list/', OrderListView.as_view(),
         name='order_list'),  # 已完成订单列表 get页面 post数据
    path('order/info/', OrderInfoView.as_view(),
         name='order_info'),  # 已完成订单详情 修改订单备注信息
    path('order/charts/data', OrderChartsView.as_view(),
         name='charts_data'),  # 订单统计 图表数据
    path('buy/product/', BuyGoodsView.as_view(),
         name='buy_product'),  # 采购单列表 创建
    path('modify/purchase/',
         ModifyPurchaseView.as_view(),
         name='modify_purchase'),  # 采购单修改
    path('finished/purchase/', StockView.as_view(),
         name='finished_purchase'),  # 入库操作
    path('purchase/list/', StockListView.as_view(),
         name='purchase_list'),  # 入库单列表 get页面 post数据
    path('get/product/', GoodsSpiderView.as_view(),
Exemplo n.º 13
0
from django.urls import path

from order.views import OrderSummaryListAPIView, OrderSummaryByCategoryListAPIView, ProductPreferenceListView
from order.views import OrderListView, PreferenceByOrderedProductListView

app_name = 'order'

urlpatterns = [
    path('orders', OrderListView.as_view(), name='orders'),
    path('orders/products/<int:product_id>/preferences',
         PreferenceByOrderedProductListView.as_view(),
         name='order_preferences'),
    path('ordersummary',
         OrderSummaryListAPIView.as_view(),
         name='ordersummary'),
    path('ordersummary/categories/<int:category_id>',
         OrderSummaryByCategoryListAPIView.as_view(),
         name='ordersummary_by_category'),
    path('preferences/products/<int:product_id>',
         ProductPreferenceListView.as_view(),
         name='preferences'),
]