Esempio n. 1
0
def save(_handler, litestrangeira_id=None, **litestrangeira_properties):
    cmd = facade.save_litestrangeira_cmd(**litestrangeira_properties)
    try:
        cmd()
    except CommandExecutionException:
        context = {'errors': cmd.errors,
                   'litestrangeira': cmd.form}

        return TemplateResponse(context, 'litestrangeiras/admin/form.html')
    _handler.redirect(router.to_path(admin))
Esempio n. 2
0
def save(**litestrangeira_properties):
    cmd = facade.save_litestrangeira_cmd(**litestrangeira_properties)
    return _save_or_update_json_response(cmd)