Sith/stock/urls.py

84 lines
2.6 KiB
Python
Raw Normal View History

2023-04-06 11:08:42 +00:00
# -*- coding:utf-8 -*-
2017-04-25 14:17:04 +00:00
#
2023-04-06 11:08:42 +00:00
# Copyright 2023 © AE UTBM
# ae@utbm.fr / ae.info@utbm.fr
# All contributors are listed in the CONTRIBUTORS file.
2017-04-25 14:17:04 +00:00
#
2023-04-06 11:08:42 +00:00
# This file is part of the website of the UTBM Student Association (AE UTBM),
# https://ae.utbm.fr.
2017-04-25 14:17:04 +00:00
#
2023-04-06 11:08:42 +00:00
# You can find the whole source code at https://github.com/ae-utbm/sith3
2017-04-25 14:17:04 +00:00
#
2023-04-06 11:08:42 +00:00
# LICENSED UNDER THE GNU GENERAL PUBLIC LICENSE VERSION 3 (GPLv3)
# SEE : https://raw.githubusercontent.com/ae-utbm/sith3/master/LICENSE
# OR WITHIN THE LOCAL FILE "LICENSE"
2017-04-25 14:17:04 +00:00
#
2023-04-06 11:08:42 +00:00
# PREVIOUSLY LICENSED UNDER THE MIT LICENSE,
# SEE : https://raw.githubusercontent.com/ae-utbm/sith3/master/LICENSE.old
# OR WITHIN THE LOCAL FILE "LICENSE.old"
2017-04-25 14:17:04 +00:00
#
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",
),
]