# -*- coding: utf-8 -*- from django.conf.urls.defaults import * from order.views import OrderView urlpatterns = patterns( 'order.views', url(r'^$', OrderView.as_view(), name='order_url'), )
from django.urls import path, include from order.views import OrderView from .views import registration, profile urlpatterns = [path('registration', registration.RegLogView.as_view(), name='registration'), path('recovery', registration.PasswordRecoveryView.as_view(), name='recovery'), path('recovery-confirm-<str:username>', registration.RecoveryConfirmView.as_view(), name='recovery_confirm'), path('password-change', registration.PasswordChangeView.as_view(), name='password_change'), path('orders', profile.OrdersView.as_view(), name='orders'), path('profile', profile.ProfileView.as_view(), name='profile'), path('wishlist', profile.WishListView.as_view(), name='wishlist'), path('order/<int:order_id>', OrderView.as_view(), name='order') ]
Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin from django.views.generic import TemplateView from order.views import OrderViewSet, OrderView from product.views import ProductListView from rest_framework.routers import DefaultRouter from django.conf import settings from django.views.static import serve router = DefaultRouter() router.register(r'orders', OrderViewSet) urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^api/', include(router.urls)), url(r'^$', ProductListView.as_view(), name='home'), url(r'^order-list/$', TemplateView.as_view(template_name="order-list.html")), url(r'^order/(?P<id>\d+)/$', OrderView.as_view(), name='order'), url(r'^media/(?P<path>.*)$', serve, { 'document_root': settings.MEDIA_ROOT, }), ]
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), ]
), url('api/cities', CitiesJsonView.as_view(), name="api_cities", ), url('api/bookmarkorder', BookmarkOrderJsonView.as_view(), name="bookmark_order", ), path('', OrdersView.as_view(), name='orders'), path('add_order', AddOrderView.as_view(), name='add_order'), path('upload_gallery_photo', UploadGalleryPhotoView.as_view(), name='upload_gallery_photo'), path('respond', OrderRespondView.as_view(), name="respond"), path('confirm', OrderConfirmView.as_view(), name="confirm"), path('<int:id>', OrderView.as_view(), name='order'), url( r'^(?P<category_value>[-\w]+)$', OrdersView.as_view(), name='orders', ), url( r'^(?P<category_value>[-\w]+)/(?P<sub_category_value>[-\w]+)$', OrdersView.as_view(), name='orders', ), ]
from django.conf.urls.static import static from django.urls import path from django.views.generic import TemplateView from core.views import OtherPagesView from order.views import OrderView from poker import settings from table.admin import admin_site from table.views import TableView urlpatterns = [ path('admin/', admin_site.urls), path('', TableView.as_view()), path('order/', OrderView.as_view()), path( 'about/', OtherPagesView.as_view(page_name='about', template_name='core/other_pages.html')), path( 'sales/', OtherPagesView.as_view(page_name='sales', template_name='core/other_pages.html')), path( 'articles/', OtherPagesView.as_view(page_name='articles', template_name='core/other_pages.html')), path( 'faq/', OtherPagesView.as_view(page_name='faq', template_name='core/other_pages.html')), path('robots.txt', TemplateView.as_view(template_name='robots.txt'))
from django.conf.urls import url from django.urls import path from order.views import OrdersView, OrderView, ServiceView, ServicesView urlpatterns = [ path('', OrdersView.as_view(), name='order_create'), path('<int:pk>/', OrderView.as_view(), name='order'), path('service/', ServicesView.as_view(), name='services'), path('service/<int:pk>/', ServiceView.as_view(), name='service') ]
from django.urls import path from order import views from order.views import OrderView, OrderFinishView, OrderDeleteView, OrderAllView, OrderAllFinishView, \ OrderAllDeleteView, OrderAllBillView, OrderBillView urlpatterns = [ # 待生产的生产订单 path('', OrderView.as_view(), name='order'), # 已完成的生产订单 path('finish/', OrderFinishView.as_view(), name='order_finish'), # 已删除的生产订单 path('delete/', OrderDeleteView.as_view(), name='order_delete'), # 查看所有待生产的订单 path('all/', OrderAllView.as_view(), name='order_all'), # 查看所有已完成的订单 path('all_finish/', OrderAllFinishView.as_view(), name='order_all_finish'), # 查看所有已删除的订单 path('all_delete/', OrderAllDeleteView.as_view(), name='order_all_delete'), # 查看所有物流单号信息 path('all_bill/', OrderAllBillView.as_view(), name='order_all_bill'), # 筛选订单 path('seach/', views.order_seach, name='order_seach'), # 查询物流单号 path('bill/', OrderBillView.as_view(), name='order_bill'), # 填写物流单号 path('odd/<int:order_id>', views.order_odd, name='order_odd') ]
from django.conf.urls import url from order.views import OrderView,OrderCommitView urlpatterns = [ url(r'^order$',OrderView.as_view(),name='order'),#提交订单页面显示 url(r'^commit$',OrderCommitView.as_view(),name='commit'),# 订单创建 ]
from django.conf.urls import url from order.views import BasketView, OrderView app_name = 'order' urlpatterns = [ url(r'^basket', BasketView.as_view(), name='basket'), url(r'^order', OrderView.as_view(), name='order'), ]
from django.urls import path from order.views import OrderView urlpatterns = [path('', OrderView.as_view(), name='order')]
from django.urls import path from order.views import OrderView urlpatterns = [path('', OrderView.as_view())]
from django.urls import path, re_path from order.views import OrderByIdView, OrderView urlpatterns = [ re_path(r"^$", OrderView.as_view(), name="order"), path(r"<id>", OrderByIdView.as_view(), name="order_id"), ]
from django.urls import path from order.views import CartView, OrderView, CartOrderView, ReviewView urlpatterns = [ path('/<int:product_id>', OrderView.as_view()), path('/cart', CartOrderView.as_view()), path('/cart/<int:product_id>', CartView.as_view()), path('/review', ReviewView.as_view()), ]
from django.urls import path from order.views import ShippingManagementView, OrderView, PayView urlpatterns = [ path('/shipping', ShippingManagementView.as_view()), path('/shipping/<int:shipping_id>', ShippingManagementView.as_view()), path('/order', OrderView.as_view()), path('/pay', PayView.as_view()) ]
from django.urls import path from order.views import OrderView urlpatterns = [ path('', OrderView.as_view(), name='order_create'), path('<int:pk>/', OrderView.as_view(), name='order_view'), ]