Allow sort/filter by vendor for sample files grid

This commit is contained in:
Lance Edgar 2023-02-22 22:41:12 -06:00
parent cf7e3c2302
commit a81e121ffd

View file

@ -61,8 +61,13 @@ class VendorSampleFileView(MasterView):
def configure_grid(self, g):
super(VendorSampleFileView, self).configure_grid(g)
model = self.model
# vendor
g.set_joiner('vendor', lambda q: q.join(model.Vendor))
g.set_sorter('vendor', model.Vendor.name)
g.set_filter('vendor', model.Vendor.name,
default_active=True, default_verb='contains')
g.set_link('vendor')
# filename