2017-04-20 12:08:27 +00:00
|
|
|
from django.conf.urls import url, include
|
2017-03-27 10:04:15 +00:00
|
|
|
|
|
|
|
from . import views
|
2018-04-14 05:13:16 +00:00
|
|
|
|
|
|
|
# URL list for web interface
|
2018-04-15 10:10:49 +00:00
|
|
|
stock_location_detail_urls = [
|
|
|
|
url(r'^edit/?', views.StockLocationEdit.as_view(), name='stock-location-edit'),
|
|
|
|
url(r'^delete/?', views.StockLocationDelete.as_view(), name='stock-location-delete'),
|
|
|
|
|
|
|
|
# Anything else
|
|
|
|
url('^.*$', views.StockLocationDetail.as_view(), name='stock-location-detail'),
|
|
|
|
]
|
|
|
|
|
|
|
|
stock_item_detail_urls = [
|
|
|
|
url(r'^edit/?', views.StockItemEdit.as_view(), name='stock-item-edit'),
|
|
|
|
url(r'^delete/?', views.StockItemDelete.as_view(), name='stock-item-delete'),
|
2018-04-29 15:00:18 +00:00
|
|
|
url(r'^move/?', views.StockItemMove.as_view(), name='stock-item-move'),
|
2018-04-15 10:10:49 +00:00
|
|
|
url('^.*$', views.StockItemDetail.as_view(), name='stock-item-detail'),
|
2018-04-14 05:13:16 +00:00
|
|
|
]
|
2018-04-15 10:10:49 +00:00
|
|
|
|
2018-04-14 05:13:16 +00:00
|
|
|
stock_urls = [
|
2018-04-15 10:10:49 +00:00
|
|
|
# Stock location
|
|
|
|
url(r'^location/(?P<pk>\d+)/', include(stock_location_detail_urls)),
|
|
|
|
|
|
|
|
url(r'^location/new/', views.StockLocationCreate.as_view(), name='stock-location-create'),
|
|
|
|
|
2018-04-15 13:27:56 +00:00
|
|
|
url(r'^item/new/?', views.StockItemCreate.as_view(), name='stock-item-create'),
|
|
|
|
|
2018-04-14 05:13:16 +00:00
|
|
|
# Individual stock items
|
2018-04-15 10:10:49 +00:00
|
|
|
url(r'^item/(?P<pk>\d+)/', include(stock_item_detail_urls)),
|
2018-04-14 05:13:16 +00:00
|
|
|
|
2018-04-15 10:10:49 +00:00
|
|
|
url(r'^.*$', views.StockIndex.as_view(), name='stock-index'),
|
2018-04-15 15:02:17 +00:00
|
|
|
]
|