Beispiel #1
0
from django.urls import path

from webapp.views import FoodListView, FoodCreateView, FoodUpdateView, FoodDeleteView, \
    OrderCreateView, OrderListView, OrderUpdateView, OrderDataUpdateView, \
    delete_view, canceled_view, delivery_view, OrderDetailView, OrderFoodAjaxCreateView, \
    OrderFoodAjaxUpdateView, OrderFoodAjaxDeleteView

from django.conf.urls.static import static
from django.conf import settings

app_name = 'webapp'

urlpatterns = [
    path('', FoodListView.as_view(), name='index'),
    path('food/create', FoodCreateView.as_view(), name='food_create'),
    path('food/<int:pk>/update', FoodUpdateView.as_view(), name='food_update'),
    path('food/<int:pk>/delete', FoodDeleteView.as_view(), name='food_delete'),
    path('order/create', OrderCreateView.as_view(), name='order_create'),
    path('orders', OrderListView.as_view(), name='order_list'),
    path('order/<int:pk>/view', OrderDetailView.as_view(),
         name='order_detail'),
    path('order/<int:pk>/update_food',
         OrderFoodAjaxUpdateView.as_view(),
         name='order_ajax_update'),
    path('order/<int:pk>/data/update',
         OrderDataUpdateView.as_view(),
         name='order_data_update'),
    path('order/food/<int:pk>/delete',
         OrderFoodAjaxDeleteView.as_view(),
         name='order_delete_food'),
    path('order/<int:order_pk>/cancel', canceled_view, name='canceled_order'),
from django.urls import path
from webapp.views import FoodDetailView, OrderDetailView, OrderCreateView, FoodCreateView, OrderUpdateView, \
    OrderFoodCreateView, FoodUpdateView, FoodDeleteView, OrderFoodDeleteView, OrdersListView, FoodListView, \
    OrderCourierUpdateView, OrdersCourierListView, InitialView, OrderFoodAjaxCreateView,OrderFoodAjaxUpdateView

app_name = 'webapp'

urlpatterns = [
    path('', OrdersListView.as_view(), name='orders_list'),
    path('login/', InitialView.as_view(), name='initial_view'),
    path('courier/orders/', OrdersCourierListView.as_view(), name='orders_courier_list'),
    path('food/', FoodListView.as_view(), name='food_list'),
    path('food/<int:pk>', FoodDetailView.as_view(), name='food_detail'),
    path('food/create', FoodCreateView.as_view(), name='food_create'),
    path('food/<int:pk>/edit', FoodUpdateView.as_view(), name='food_edit'),
    path('food/<int:pk>/delete', FoodDeleteView.as_view(), name='food_delete'),
    path('order/<int:pk>', OrderDetailView.as_view(), name='order_detail'),
    path('order/create', OrderCreateView.as_view(), name='order_create'),
    path('order/<int:pk>/update', OrderUpdateView.as_view(), name='order_update'),
    path('order/<int:pk>/courier_update', OrderCourierUpdateView.as_view(), name='order_courier_update'),
    path('order/<int:pk>/food/create', OrderFoodAjaxCreateView.as_view(), name='order_food_create'),
    path('order/<int:pk>/food/delete', OrderFoodDeleteView.as_view(), name='order_food_delete'),
    path('order/food/<int:pk>/update', OrderFoodAjaxUpdateView.as_view(), name='order_food_update'),
]