Changeset 862198c in tailbone
- Timestamp:
- 08/03/2022 11:13:43 AM (6 months ago)
- Branches:
- master
- Children:
- 4ff0450
- Parents:
- 3726a26
- Location:
- tailbone/views
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tailbone/views/employees.py
r3726a26 r862198c 305 305 return HTML.tag('ul', c=items) 306 306 307 def touch_instance(self, employee): 308 app = self.get_rattail_app() 309 employment = app.get_employment_handler() 310 employment.touch_employee(self.Session(), employee) 311 307 312 def get_version_child_classes(self): 308 313 return [ -
tailbone/views/master.py
r3726a26 r862198c 1160 1160 Perform actual "touch" logic for the given object. 1161 1161 """ 1162 change = model.Change() 1163 change.class_name = obj.__class__.__name__ 1164 change.instance_uuid = obj.uuid 1165 change = self.Session.merge(change) 1166 change.deleted = False 1162 app = self.get_rattail_app() 1163 app.touch_object(self.Session(), obj) 1167 1164 1168 1165 def versions(self): … … 4796 4793 config.add_tailbone_permission(permission_prefix, '{}.touch'.format(permission_prefix), 4797 4794 "\"Touch\" a {} to trigger datasync for it".format(model_title)) 4798 config.add_route('{}.touch'.format(route_prefix), '{}/touch'.format(instance_url_prefix)) 4795 config.add_route('{}.touch'.format(route_prefix), 4796 '{}/touch'.format(instance_url_prefix), 4797 # TODO: should add this restriction after the old 4798 # jquery theme is no longer in use 4799 #request_method='POST' 4800 ) 4799 4801 config.add_view(cls, attr='touch', route_name='{}.touch'.format(route_prefix), 4800 4802 permission='{}.touch'.format(permission_prefix))
Note: See TracChangeset
for help on using the changeset viewer.