예제 #1
0
def save(_handler, litnacional_id, **litnacional_properties):
    cmd = facade.update_litnacional_cmd(litnacional_id, **litnacional_properties)
    try:
        cmd()
    except CommandExecutionException:
        context = {'errors': cmd.errors,
                   'litnacional': cmd.form}

        return TemplateResponse(context, 'litnacionals/admin/form.html')
    _handler.redirect(router.to_path(admin))
예제 #2
0
def update(litnacional_id, **litnacional_properties):
    cmd = facade.update_litnacional_cmd(litnacional_id, **litnacional_properties)
    return _save_or_update_json_response(cmd)