def save(_handler, budismo_id=None, **budismo_properties): cmd = facade.save_budismo_cmd(**budismo_properties) try: cmd() except CommandExecutionException: context = {'errors': cmd.errors, 'budismo': cmd.form} return TemplateResponse(context, 'budismos/admin/form.html') _handler.redirect(router.to_path(admin))
def save(**budismo_properties): cmd = facade.save_budismo_cmd(**budismo_properties) return _save_or_update_json_response(cmd)