def index(): cmd = facade.list_litinfantojuvs_cmd() litinfantojuvs = cmd() public_form = facade.litinfantojuv_public_form() litinfantojuv_public_dcts = [public_form.fill_with_model(litinfantojuv) for litinfantojuv in litinfantojuvs] context = {'litinfantojuvs': litinfantojuv_public_dcts,'admin_path':router.to_path(admin)} return TemplateResponse(context)
def index(): cmd = facade.list_litinfantojuvs_cmd() litinfantojuvs = cmd() edit_path = router.to_path(edit) delete_path = router.to_path(delete) short_form = facade.litinfantojuv_short_form() def short_litinfantojuv_dict(litinfantojuv): litinfantojuv_dct = short_form.fill_with_model(litinfantojuv) litinfantojuv_dct['edit_path'] = router.to_path(edit_path, litinfantojuv_dct['id']) litinfantojuv_dct['delete_path'] = router.to_path(delete_path, litinfantojuv_dct['id']) return litinfantojuv_dct short_litinfantojuvs = [short_litinfantojuv_dict(litinfantojuv) for litinfantojuv in litinfantojuvs] context = {'litinfantojuvs': short_litinfantojuvs, 'new_path': router.to_path(new)} return TemplateResponse(context)
def index(): cmd = facade.list_litinfantojuvs_cmd() litinfantojuv_list = cmd() short_form=facade.litinfantojuv_short_form() litinfantojuv_short = [short_form.fill_with_model(m) for m in litinfantojuv_list] return JsonResponse(litinfantojuv_short)