def update(self): if 'remove' in self.request and utils.is_uuid(self.request['remove']): self.remove_reservation(self.request['remove']) self.request.response.redirect(self.context.absolute_url()) super(YourReservations, self).update()
def highlight_group(self): """ Returns the group id to highlight when hovering over any result. As there is no reservation view with multiple groups, only one result can be returned. """ if hasattr(self, 'group'): if utils.is_uuid(self.group): return utils.string_uuid(self.group) return u''
def get_object(obj): if is_uuid(obj): return UUID(obj), get_resource_by_uuid(obj) else: return UUID(obj.uuid()), obj
def body_classes(self): if utils.is_uuid(self.reservation): return ["single-reservation-view"]
def transform_uuid(target): if utils.is_uuid(target): return utils.string_uuid(target) else: return target
def body_classes(self): if utils.is_uuid(self.reservation): return ['single-reservation-view']