InvenTree/InvenTree/stock/urls.py

34 lines
1.2 KiB
Python
Raw Normal View History

from django.conf.urls import url, include
2017-03-27 10:04:15 +00:00
from . import views
# URL list for web interface
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'),
url('^.*$', views.StockItemDetail.as_view(), name='stock-item-detail'),
]
stock_urls = [
# 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'),
url(r'^item/new/?', views.StockItemCreate.as_view(), name='stock-item-create'),
# Individual stock items
url(r'^item/(?P<pk>\d+)/', include(stock_item_detail_urls)),
url(r'^.*$', views.StockIndex.as_view(), name='stock-index'),
2018-04-15 15:02:17 +00:00
]