InvenTree/InvenTree/stock/urls.py

30 lines
812 B
Python
Raw Normal View History

from django.conf.urls import url, include
2017-03-27 10:04:15 +00:00
from . import views
from . import api
2017-03-27 10:04:15 +00:00
stock_endpoints = [
url(r'^$', api.StockDetail.as_view(), name='stockitem-detail'),
url(r'^stocktake/?$', api.StockStocktakeEndpoint.as_view(), name='stockitem-stocktake'),
url(r'^add-stock/?$', api.AddStockEndpoint.as_view(), name='stockitem-add-stock'),
]
2017-04-15 13:14:05 +00:00
stock_urls = [
2017-04-14 02:54:34 +00:00
# Detail for a single stock item
url(r'^(?P<pk>[0-9]+)/', include(stock_endpoints)),
2017-04-11 08:58:44 +00:00
2017-04-14 02:54:34 +00:00
# List all stock items, with optional filters
url(r'^\?.*/?$', api.StockList.as_view()),
url(r'^$', api.StockList.as_view()),
2017-03-28 12:25:38 +00:00
]
2017-04-15 13:14:05 +00:00
stock_loc_urls = [
url(r'^(?P<pk>[0-9]+)/?$', api.LocationDetail.as_view(), name='stocklocation-detail'),
2017-04-15 13:14:05 +00:00
url(r'^\?.*/?$', api.LocationList.as_view()),
2017-04-15 13:14:05 +00:00
url(r'^$', api.LocationList.as_view())
2017-04-15 13:14:05 +00:00
]