Example #1
0
def save(_handler, biblias_id, **biblias_properties):
    cmd = facade.update_biblias_cmd(biblias_id, **biblias_properties)
    try:
        cmd()
    except CommandExecutionException:
        context = {'errors': cmd.errors,
                   'biblias': cmd.form}

        return TemplateResponse(context, 'bibliass/admin/form.html')
    _handler.redirect(router.to_path(admin))
Example #2
0
def update(biblias_id, **biblias_properties):
    cmd = facade.update_biblias_cmd(biblias_id, **biblias_properties)
    return _save_or_update_json_response(cmd)