def delete_model(self, model):
    '\n            Delete model helper\n\n            :param model:\n                Model instance\n        '
    try:
        self.on_model_delete(model)
        model.delete()
    except Exception as ex:
        if (not self.handle_view_exception(ex)):
            flash(gettext('Failed to delete record. %(error)s', error=format_error(ex)), 'error')
            log.exception('Failed to delete record.')
        return False
    else:
        self.after_model_delete(model)
    return True
Delete model helper

:param model:
    Model instance
def delete_model(self, model):
    '\n            Delete model helper\n\n            :param model:\n                Model instance\n        '
    try:
        self.on_model_delete(model)
        model.delete()
    except Exception as ex:
        if (not self.handle_view_exception(ex)):
            flash(gettext('Failed to delete record. %(error)s', error=format_error(ex)), 'error')
            log.exception('Failed to delete record.')
        return False
    else:
        self.after_model_delete(model)
    return True