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
|
|
|
|
|
2017-04-20 12:08:27 +00:00
|
|
|
stock_endpoints = [
|
|
|
|
url(r'^$', views.StockDetail.as_view(), name='stockitem-detail'),
|
|
|
|
|
|
|
|
url(r'^stocktake/?$', views.StockStocktakeEndpoint.as_view(), name='stockitem-stocktake'),
|
|
|
|
|
|
|
|
url(r'^add-stock/?$', views.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
|
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
|
2017-04-14 13:44:24 +00:00
|
|
|
url(r'^\?.*/?$', views.StockList.as_view()),
|
|
|
|
url(r'^$', views.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]+)/?$', views.LocationDetail.as_view(), name='stocklocation-detail'),
|
|
|
|
|
|
|
|
url(r'^\?.*/?$', views.LocationList.as_view()),
|
|
|
|
|
|
|
|
url(r'^$', views.LocationList.as_view())
|
|
|
|
]
|