2016-10-31 07:19:46 +00:00
|
|
|
from django.conf.urls import include, url
|
|
|
|
|
|
|
|
from stock.views import *
|
|
|
|
|
|
|
|
urlpatterns = [
|
2017-04-25 06:57:07 +00:00
|
|
|
#Stock urls
|
|
|
|
url(r'^new/counter/(?P<counter_id>[0-9]+)$', StockCreateView.as_view(), name='new'),
|
|
|
|
url(r'^edit/(?P<stock_id>[0-9]+)$', StockEditView.as_view(), name='edit'),
|
|
|
|
url(r'^list$', StockListView.as_view(), name='list'),
|
2016-11-13 23:38:33 +00:00
|
|
|
|
2017-04-25 06:57:07 +00:00
|
|
|
# StockItem urls
|
|
|
|
url(r'^(?P<stock_id>[0-9]+)$', StockItemList.as_view(), name='items_list'),
|
2017-04-25 07:45:13 +00:00
|
|
|
url(r'^(?P<stock_id>[0-9]+)/stock_item/new_item$', StockItemCreateView.as_view(), name='new_item'),
|
|
|
|
url(r'^stock_item/(?P<item_id>[0-9]+)/edit$', StockItemEditView.as_view(), name='edit_item'),
|
|
|
|
url(r'^(?P<stock_id>[0-9]+)/stock_item/take_items$', StockTakeItemsBaseFormView.as_view(), name='take_items'),
|
2016-12-28 18:25:43 +00:00
|
|
|
|
2017-04-25 06:57:07 +00:00
|
|
|
# ShoppingList urls
|
2017-04-25 07:45:13 +00:00
|
|
|
url(r'^(?P<stock_id>[0-9]+)/shopping_list/list$', StockShoppingListView.as_view(), name='shoppinglist_list'),
|
|
|
|
url(r'^(?P<stock_id>[0-9]+)/shopping_list/create$', StockItemQuantityBaseFormView.as_view(), name='shoppinglist_create'),
|
|
|
|
url(r'^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/items$', StockShoppingListItemListView.as_view(),
|
2017-04-25 06:57:07 +00:00
|
|
|
name='shoppinglist_items'),
|
2017-04-25 07:45:13 +00:00
|
|
|
url(r'^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/delete$', StockShoppingListDeleteView.as_view(),
|
2017-04-25 06:57:07 +00:00
|
|
|
name='shoppinglist_delete'),
|
2017-04-25 07:45:13 +00:00
|
|
|
url(r'^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/set_done$', StockShopppingListSetDone.as_view(),
|
2017-04-25 06:57:07 +00:00
|
|
|
name='shoppinglist_set_done'),
|
2017-04-25 07:45:13 +00:00
|
|
|
url(r'^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/set_todo$', StockShopppingListSetTodo.as_view(),
|
2017-04-25 06:57:07 +00:00
|
|
|
name='shoppinglist_set_todo'),
|
2017-04-25 07:45:13 +00:00
|
|
|
url(r'^(?P<stock_id>[0-9]+)/shopping_list/(?P<shoppinglist_id>[0-9]+)/update_stock$', StockUpdateAfterShopppingBaseFormView.as_view(),
|
2017-04-25 06:57:07 +00:00
|
|
|
name='update_after_shopping'),
|
|
|
|
]
|