Ejemplo n.º 1
0
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
from user.views import index, RegisterView, LoginView, logout
from product.views import (
    ProductList,
    ProductCreate,
    ProductDetail,
    ProductListAPI,
    ProductDetailAPI,
)
from order.views import OrderCreate, OrderList

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/create/', ProductCreate.as_view()),
    path('product/<int:pk>/', ProductDetail.as_view()),
    path('order/', OrderList.as_view()),
    path('order/create/', OrderCreate.as_view()),
    path('api/product/', ProductListAPI.as_view()),
    path('api/product/<int:pk>/', ProductDetailAPI.as_view()),
]
Ejemplo n.º 2
0
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
from fcuser.views import index, RegisterView, LoginView
from product.views import ProductList, ProductCreate, ProductDetail
from order.views import OrderCreate, OrderList

urlpatterns = [
    path("admin/", admin.site.urls),
    path("", index),
    path("register/",
         RegisterView.as_view()),  # 뷰클래스 사용시 as_view() 함수를 사용해야합니다
    path("login/", LoginView.as_view()),
    path("product/", ProductList.as_view()),
    path("product/<int:pk>/", ProductDetail.as_view()),
    # path("product/create", ProductCreate.as_view()) 로 입력해서 계속 에러가 났엇음 슬래시 주의할것
    path("product/create/", ProductCreate.as_view()),
    path("order/", OrderList.as_view()),
    path("order/create/", OrderCreate.as_view()),
]
Ejemplo n.º 3
0
from django.conf.urls import url
from django.utils.translation import ugettext_lazy as _

from order.views import (OrderList, OrderDetail, CreateOrder,
                         CreateOrdersBatch, UpdateOrder, UpdateOrderStatus,
                         CreateDeleteOrderClientBill, DeleteOrder)

app_name = "order"

urlpatterns = [
    url(_(r'^list/$'), OrderList.as_view(), name='list'),
    url(_(r'^view/(?P<pk>\d+)/$'), OrderDetail.as_view(), name='view'),
    url(_(r'^create/$'), CreateOrder.as_view(), name='create'),
    # Multiple orders as once
    url(_(r'^create/batch$'), CreateOrdersBatch.as_view(),
        name='create_batch'),
    url(_(r'^update/(?P<pk>\d+)/$'), UpdateOrder.as_view(), name='update'),
    url(_(r'^update/(?P<pk>\d+)/status$'),
        UpdateOrderStatus.as_view(),
        name='update_status'),
    url(_(r'^update/(?P<pk>\d+)/client_bill$'),
        CreateDeleteOrderClientBill.as_view(),
        name='update_client_bill'),
    url(_(r'^delete/(?P<pk>\d+)/$'), DeleteOrder.as_view(), name='delete'),
]
Ejemplo n.º 4
0
     UpdateProductStock.as_view(),
     name="Update_product_stock"),
 url(r'^api/mystyle', MyStyleList.as_view(), name="My_Style"),
 url(r'^api/mystyle/(?P<pk>[0-9]+)',
     UpdateMerchant.as_view(),
     name="Edit_Style"),
 url(r'^api/photos', PhotosList.as_view(), name="Store_photos"),
 url(r'^api/photos/(?P<pk>[0-9]+)',
     UpdatePhotos.as_view(),
     name="Edit_photos"),
 url(r'^api/feed', FeedList.as_view(), name="Show_feed"),
 url(r'^api/feed/(?P<pk>[0-9]+)', UpdateFeed.as_view(), name="Edit_Feed"),
 url(r'^api/users', UserList.as_view(), name="Users"),
 #url(r'^api/registration', CreateUserView.as_view(), name="Register"),
 #url(r'^api/users/(?P<pk>[0-9]+)', UpdateUser.as_view(), name="Edit_User"),
 url(r'^api/orders', OrderList.as_view(), name="Orders"),
 url(r'^api/orders/(?P<pk>[0-9]+)',
     UpdateOrder.as_view(),
     name="Edit_orders"),
 url(r'^api/payment', PaymentList.as_view(), name="Payment"),
 url(r'^api/payment/(?P<pk>[0-9]+)',
     PaymentList.as_view(),
     name="Edit_payment"),
 url(r'^api/orderered-products',
     OrderedProductsList.as_view(),
     name="orderered_products"),
 url(r'^api/orderered-products/(?P<pk>[0-9]+)',
     UpdateOrderedProducts.as_view(),
     name="orderered_products"),
 url(r'^api/product', ProductsList.as_view(), name="products"),
 url(r'^api/product/(?P<pk>[0-9]+)',
Ejemplo n.º 5
0
"""fc_django URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/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 order.views import OrderCreate, OrderList

urlpatterns = [
    path("create/", OrderCreate.as_view()),
    path("list/", OrderList.as_view(), name="Order_List"),
]
Ejemplo n.º 6
0
from django.utils.translation import ugettext_lazy as _

from order.views import (
    OrderList,
    OrderDetail,
    CreateOrder,
    CreateOrdersBatch,
    UpdateOrder,
    UpdateOrderStatus,
    CreateDeleteOrderClientBill,
    DeleteOrder)

app_name = "order"

urlpatterns = [
    url(_(r'^list/$'), OrderList.as_view(), name='list'),
    url(_(r'^view/(?P<pk>\d+)/$'), OrderDetail.as_view(), name='view'),
    url(_(r'^create/$'), CreateOrder.as_view(), name='create'),
    # Multiple orders as once
    url(_(r'^create/batch$'),
        CreateOrdersBatch.as_view(), name='create_batch'),

    url(_(r'^update/(?P<pk>\d+)/$'), UpdateOrder.as_view(), name='update'),
    url(
        _(r'^update/(?P<pk>\d+)/status$'),
        UpdateOrderStatus.as_view(),
        name='update_status'
    ),
    url(
        _(r'^update/(?P<pk>\d+)/client_bill$'),
        CreateDeleteOrderClientBill.as_view(),
Ejemplo n.º 7
0
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required

from order.views import OrderList, OrderCreate, OrderUpdate, OrderDelete

urlpatterns = patterns('',
    url(r'^$', login_required(OrderList.as_view()), name='order_list'),
    url(r'^new$', login_required(OrderCreate.as_view()), name='order_new'),
    url(r'^edit/(?P<pk>\d+)$', login_required(OrderUpdate.as_view()), name='order_update'),
    url(r'^delete/(?P<pk>\d+)$', login_required(OrderDelete.as_view()), name='order_delete'),
)
Ejemplo n.º 8
0
    DeleteOrder,
    UpdateOrder_continue,
    OrderListAdmin,
    UpdateOrder_continue_admin,
    Create_Comment_Order,
    Update_Comment_Order,
    Delete_Comment_Order,
    Create_Comment_Book,
    Create_Comment_Book_Admin,
)

app_name = 'order'

urlpatterns = [
    path('detail/<int:pk>', DetailOrder.as_view(), name='detail'),
    path('list/', OrderList.as_view(), name='list'),
    path('update/', UpdateOrder.as_view(), name='update'),
    path('update_order/<int:pk>',
         UpdateOrder_continue.as_view(),
         name='update_order'),
    path('update_admin/<int:pk>',
         UpdateOrder_continue_admin.as_view(),
         name='update_admin'),
    path('delete/<int:pk>', DeleteOrder.as_view(), name='delete'),
    path('create_comment/',
         Create_Comment_Order.as_view(),
         name='create_comment'),
    path('update_comment/',
         Update_Comment_Order.as_view(),
         name='update_comment'),
    path('delete_comment/',
Ejemplo n.º 9
0
from django.conf.urls import url
from django.urls import include
from django.contrib.auth.views import logout
from order.views import OrderList
from .views import login_view, register_view, home_view, edit_view
from django.contrib.auth.decorators import login_required

urlpatterns = [
    url(r'^logout/$', logout, name = 'logout'),
    url(r'^login/$', login_view, name = 'login'),
    url(r'^register/$', register_view, name='register'),
    url(r'^$', home_view, name='home'),
    url(r'edit$', edit_view, name = 'edit'),
    url(r'order_list$', login_required(OrderList.as_view()), name = 'order_list'),

]
Ejemplo n.º 10
0
"""sales URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
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 order.views import OrderList, OrderCreate, OrderDelete, OrderUpdate

urlpatterns = [
    url(r'^$', OrderList.as_view(),name='orders'),
    url(r'novo$', OrderCreate.as_view(),name='order_new'),
    url(r'editar/(?P<pk>\d+)$', OrderUpdate.as_view(),name='order_update'),
    url(r'excluir/(?P<pk>\d+)$',OrderDelete.as_view(), name='order_delete')
    # url(r'excluir$', OrderDelete.as_view(), name='order_delete')
    
]