Sith/stock/urls.py

89 lines
2.8 KiB
Python
Raw Permalink Normal View History

2017-04-25 14:17:04 +00:00
# -*- coding:utf-8 -*
#
# Copyright 2016,2017
# - Guillaume "Lo-J" Renaud <renaudg779@gmail.com>
# - Skia <skia@libskia.so>
#
# Ce fichier fait partie du site de l'Association des Étudiants de l'UTBM,
# http://ae.utbm.fr.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License a published by the Free Software
# Foundation; either version 3 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Sofware Foundation, Inc., 59 Temple
# Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
2023-01-09 21:07:03 +00:00
from django.urls import path
from stock.views import *
urlpatterns = [
2019-10-05 16:14:41 +00:00
# Stock re_paths
2023-01-09 21:07:03 +00:00
path("new/counter/<int:counter_id>/", StockCreateView.as_view(), name="new"),
path("edit/<int:stock_id>/", StockEditView.as_view(), name="edit"),
path("list/", StockListView.as_view(), name="list"),
2019-10-05 16:14:41 +00:00
# StockItem re_paths
2023-01-09 21:07:03 +00:00
path("<int:stock_id>/", StockItemList.as_view(), name="items_list"),
path(
"<int:stock_id>/stock_item/new_item/",
2018-10-04 19:29:19 +00:00
StockItemCreateView.as_view(),
name="new_item",
),
2023-01-09 21:07:03 +00:00
path(
"stock_item/<int:item_id>/edit/",
2018-10-04 19:29:19 +00:00
StockItemEditView.as_view(),
name="edit_item",
),
2023-01-09 21:07:03 +00:00
path(
"<int:stock_id>/stock_item/take_items/",
2018-10-04 19:29:19 +00:00
StockTakeItemsBaseFormView.as_view(),
name="take_items",
),
2019-10-05 16:14:41 +00:00
# ShoppingList re_paths
2023-01-09 21:07:03 +00:00
path(
"<int:stock_id>/shopping_list/list/",
2018-10-04 19:29:19 +00:00
StockShoppingListView.as_view(),
name="shoppinglist_list",
),
2023-01-09 21:07:03 +00:00
path(
"<int:stock_id>/shopping_list/create/",
2018-10-04 19:29:19 +00:00
StockItemQuantityBaseFormView.as_view(),
name="shoppinglist_create",
),
2023-01-09 21:07:03 +00:00
path(
"<int:stock_id>/shopping_list/<int:shoppinglist_id>/items/",
2018-10-04 19:29:19 +00:00
StockShoppingListItemListView.as_view(),
name="shoppinglist_items",
),
2023-01-09 21:07:03 +00:00
path(
"<int:stock_id>/shopping_list/<int:shoppinglist_id>/delete/",
2018-10-04 19:29:19 +00:00
StockShoppingListDeleteView.as_view(),
name="shoppinglist_delete",
),
2023-01-09 21:07:03 +00:00
path(
"<int:stock_id>/shopping_list/<int:shoppinglist_id>/set_done/",
2018-10-04 19:29:19 +00:00
StockShopppingListSetDone.as_view(),
name="shoppinglist_set_done",
),
2023-01-09 21:07:03 +00:00
path(
"<int:stock_id>/shopping_list/<int:shoppinglist_id>/set_todo/",
2018-10-04 19:29:19 +00:00
StockShopppingListSetTodo.as_view(),
name="shoppinglist_set_todo",
),
2023-01-09 21:07:03 +00:00
path(
"<int:stock_id>/shopping_list/<int:shoppinglist_id>/update_stock/",
2018-10-04 19:29:19 +00:00
StockUpdateAfterShopppingBaseFormView.as_view(),
name="update_after_shopping",
),
]