Add autocomplete support when overriding Vendors view..ugh

This commit is contained in:
Lance Edgar 2021-01-27 22:23:41 -06:00
parent 21465c1600
commit ad405d0777

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2020 Lance Edgar
# Copyright © 2010-2021 Lance Edgar
#
# This file is part of Rattail.
#
@ -92,4 +92,11 @@ class VendorView(base.VendorsView):
def includeme(config):
# TODO: ugh
# autocomplete
config.add_route('vendors.autocomplete', '/vendors/autocomplete')
config.add_view(base.VendorsAutocomplete, route_name='vendors.autocomplete',
renderer='json', permission='vendors.list')
VendorView.defaults(config)