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 04:11:46 +00:00
|
|
|
from . import api
|
2017-03-27 10:04:15 +00:00
|
|
|
|
2017-04-20 12:08:27 +00:00
|
|
|
stock_endpoints = [
|
2018-04-14 04:11:46 +00:00
|
|
|
url(r'^$', api.StockDetail.as_view(), name='stockitem-detail'),
|
2017-04-20 12:08:27 +00:00
|
|
|
|
2018-04-14 04:11:46 +00:00
|
|
|
url(r'^stocktake/?$', api.StockStocktakeEndpoint.as_view(), name='stockitem-stocktake'),
|
2017-04-20 12:08:27 +00:00
|
|
|
|
2018-04-14 04:11:46 +00:00
|
|
|
url(r'^add-stock/?$', api.AddStockEndpoint.as_view(), name='stockitem-add-stock'),
|
2017-04-20 12:08:27 +00:00
|
|
|
]
|
|
|
|
|
2017-04-15 13:14:05 +00:00
|
|
|
stock_urls = [
|
2017-04-14 02:54:34 +00:00
|
|
|
# Detail for a single stock item
|
2017-04-20 12:08:27 +00:00
|
|
|
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
|
2018-04-14 04:11:46 +00:00
|
|
|
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 = [
|
2018-04-14 04:11:46 +00:00
|
|
|
url(r'^(?P<pk>[0-9]+)/?$', api.LocationDetail.as_view(), name='stocklocation-detail'),
|
2017-04-15 13:14:05 +00:00
|
|
|
|
2018-04-14 04:11:46 +00:00
|
|
|
url(r'^\?.*/?$', api.LocationList.as_view()),
|
2017-04-15 13:14:05 +00:00
|
|
|
|
2018-04-14 04:11:46 +00:00
|
|
|
url(r'^$', api.LocationList.as_view())
|
2017-04-15 13:14:05 +00:00
|
|
|
]
|