Added email address to vendor CRUD views.
This commit is contained in:
parent
680cc8aeb4
commit
5f3b91826a
|
@ -84,6 +84,7 @@ class VendorCrud(CrudView):
|
||||||
fs.id.label("ID"),
|
fs.id.label("ID"),
|
||||||
fs.name,
|
fs.name,
|
||||||
fs.special_discount,
|
fs.special_discount,
|
||||||
|
fs.email.label("Email Address"),
|
||||||
])
|
])
|
||||||
return fs
|
return fs
|
||||||
|
|
||||||
|
@ -94,32 +95,31 @@ class VendorsAutocomplete(AutocompleteView):
|
||||||
fieldname = 'name'
|
fieldname = 'name'
|
||||||
|
|
||||||
|
|
||||||
def includeme(config):
|
def add_routes(config):
|
||||||
|
|
||||||
config.add_route('vendors', '/vendors')
|
config.add_route('vendors', '/vendors')
|
||||||
|
config.add_route('vendors.autocomplete', '/vendors/autocomplete')
|
||||||
|
config.add_route('vendor.create', '/vendors/new')
|
||||||
|
config.add_route('vendor.read', '/vendors/{uuid}')
|
||||||
|
config.add_route('vendor.update', '/vendors/{uuid}/edit')
|
||||||
|
config.add_route('vendor.delete', '/vendors/{uuid}/delete')
|
||||||
|
|
||||||
|
|
||||||
|
def includeme(config):
|
||||||
|
add_routes(config)
|
||||||
|
|
||||||
config.add_view(VendorsGrid, route_name='vendors',
|
config.add_view(VendorsGrid, route_name='vendors',
|
||||||
renderer='/vendors/index.mako',
|
renderer='/vendors/index.mako',
|
||||||
permission='vendors.list')
|
permission='vendors.list')
|
||||||
|
|
||||||
config.add_route('vendors.autocomplete', '/vendors/autocomplete')
|
|
||||||
config.add_view(VendorsAutocomplete, route_name='vendors.autocomplete',
|
config.add_view(VendorsAutocomplete, route_name='vendors.autocomplete',
|
||||||
renderer='json', permission='vendors.list')
|
renderer='json', permission='vendors.list')
|
||||||
|
|
||||||
config.add_route('vendor.create', '/vendors/new')
|
|
||||||
config.add_view(VendorCrud, attr='create', route_name='vendor.create',
|
config.add_view(VendorCrud, attr='create', route_name='vendor.create',
|
||||||
renderer='/vendors/crud.mako',
|
renderer='/vendors/crud.mako',
|
||||||
permission='vendors.create')
|
permission='vendors.create')
|
||||||
|
|
||||||
config.add_route('vendor.read', '/vendors/{uuid}')
|
|
||||||
config.add_view(VendorCrud, attr='read', route_name='vendor.read',
|
config.add_view(VendorCrud, attr='read', route_name='vendor.read',
|
||||||
renderer='/vendors/crud.mako',
|
renderer='/vendors/crud.mako',
|
||||||
permission='vendors.read')
|
permission='vendors.read')
|
||||||
|
|
||||||
config.add_route('vendor.update', '/vendors/{uuid}/edit')
|
|
||||||
config.add_view(VendorCrud, attr='update', route_name='vendor.update',
|
config.add_view(VendorCrud, attr='update', route_name='vendor.update',
|
||||||
renderer='/vendors/crud.mako',
|
renderer='/vendors/crud.mako',
|
||||||
permission='vendors.update')
|
permission='vendors.update')
|
||||||
|
|
||||||
config.add_route('vendor.delete', '/vendors/{uuid}/delete')
|
|
||||||
config.add_view(VendorCrud, attr='delete', route_name='vendor.delete',
|
config.add_view(VendorCrud, attr='delete', route_name='vendor.delete',
|
||||||
permission='vendors.delete')
|
permission='vendors.delete')
|
||||||
|
|
Loading…
Reference in a new issue