Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| docs:dev:python:services [2024/02/21 13:59] – créée lena | docs:dev:python:services [2024/02/21 14:18] (Version actuelle) – lena | ||
|---|---|---|---|
| Ligne 4: | Ligne 4: | ||
| <code python> | <code python> | ||
| - | vdoc, root = getWSOutput(request) | + | vdoc, root_node |
| </ | </ | ||
| Ligne 13: | Ligne 13: | ||
| return vdoc | return vdoc | ||
| + | </ | ||
| + | |||
| + | ===== Ajouter une liste d' | ||
| + | |||
| + | On ajoute l' | ||
| + | |||
| + | <code python> | ||
| + | vdoc, root_node = getWSOutput(request) | ||
| + | |||
| + | list_node = vdoc.object(root_node, | ||
| + | </ | ||
| + | |||
| + | Pour chaque élément de la liste on ajoute une row | ||
| + | |||
| + | <code python> | ||
| + | vdoc.row( | ||
| + | node_adress = list_node, | ||
| + | key = " | ||
| + | value = { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | }) | ||
| + | </ | ||
| + | |||
| + | ==== Retourner une erreur ==== | ||
| + | |||
| + | <code python> | ||
| + | vdoc.error(-1, | ||
| + | return vdoc | ||
| </ | </ | ||