Fix some config for product views

ugh
This commit is contained in:
Lance Edgar 2020-09-16 15:49:25 -05:00
parent 5700ca0171
commit 8e9f73fc68

View file

@ -102,4 +102,15 @@ class ProductView(base.ProductsView):
def includeme(config):
# TODO: getting pretty tired of copy/pasting this extra config...
config.add_route('products.autocomplete', '/products/autocomplete')
config.add_view(base.ProductsAutocomplete, route_name='products.autocomplete',
renderer='json', permission='products.list')
# TODO: getting pretty tired of copy/pasting this extra config...
config.add_route('products.print_labels', '/products/labels')
config.add_view(base.print_labels, route_name='products.print_labels',
renderer='json', permission='products.print_labels')
ProductView.defaults(config)