示例#1
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 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)
示例#2
0
from ecommerce2.views import about
from reportes.consultas import ReporteProductos, VentasDia, imprimir_ventas, practicas
                    

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    '),


]
)

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'newsletter.views.home', name='home'),
    url(r'^contact/', 'newsletter.views.contact', name='contact'),
    url(r'^message_submitted/',
        'newsletter.views.message_submitted',
        name='contact_us_submitted'),
    url(r'^sign-up-successful/',
        'newsletter.views.sign_up_successful',
        name='sign_up_successful'),
    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'^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 URLS
    url(r'^api/auth/token/$', 'rest_framework_jwt.views.obtain_jwt_token'),
示例#4
0
from django.urls import path

from orders.views import (OrderList, UserOrderView)

urlpatterns = [
    path("orders/", view=OrderList.as_view(), name="list"),
    path("my-orders/", view=UserOrderView.as_view(), name="user-orders"),
]
示例#5
0
from django.urls import path
from . import views
from orders.views import OrderList
from orders.views import OrderDetail
from orders.views import OrderUpdate
from orders.views import CreateOrder

urlpatterns = [
    path('list/', OrderList.as_view(), name='order-list'),
    path('create', CreateOrder.as_view(), name='create-order'),
    path('update/<slug:slug>/', OrderUpdate.as_view(success_url="/orders/list"), name='order-update'),
    path('<slug:slug>/', OrderDetail.as_view(), name='order-detail'),
]
示例#6
0
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
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 = [
    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'^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)
示例#7
0
from django.urls import path
from orders.views import OrdersView, OrderList, OrderDetail

urlpatterns = [
    path('', OrdersView.as_view(), name='orders-index'),
    path('api/orders/', OrderList.as_view(), name='order-list'),
    path('api/orders/<int:pk>/', OrderDetail.as_view(), name='order-detail'),
]
示例#8
0
#!/usr/bin/env python
# encoding: utf-8


"""
@version: ??
@author: liangliangyy
@license: MIT Licence 
@contact: [email protected]
@site: https://www.lylinux.net/
@software: PyCharm
@file: urls.py
@time: 2018/6/10 下午12:16
"""

from django.urls import path
from orders.views import OrderList, OrderDetail, BlessingDetail, update_show_confession_wall

app_name = "orders"

urlpatterns = [
    path(r'order', OrderList.as_view(), name='orderlist'),
    path(r'orderdetail/<str:pk>', OrderDetail.as_view(), name='orderdetail'),
    path('blessing', BlessingDetail.as_view(), name='blessing'),
    path('updatewall', update_show_confession_wall, name='updatewall')
]
示例#9
0
"""backend_django URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/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 vendor.views import MenuList
from orders.views import OrderList, ClearOrder

urlpatterns = [
    path('admin/', admin.site.urls),
    path('vendor/MenuList/', MenuList.as_view()),
    path('orders/OrderList/', OrderList.as_view()),
    path('orders/ClearOrder/', ClearOrder.as_view())
]