From d18294e838d694323b6ca9a766cad5e19aaf1e96 Mon Sep 17 00:00:00 2001 From: Yusuf Yuksel Date: Wed, 6 Nov 2024 18:47:53 +0000 Subject: [PATCH] update docs --- .../connect/update-data-connections.md | 68 +------------------ 1 file changed, 2 insertions(+), 66 deletions(-) diff --git a/docs/tutorial/connect/update-data-connections.md b/docs/tutorial/connect/update-data-connections.md index 8f5687b8ec..3278fc4a34 100644 --- a/docs/tutorial/connect/update-data-connections.md +++ b/docs/tutorial/connect/update-data-connections.md @@ -39,21 +39,7 @@ We will continue with the code we used to create some heroes, and we'll update t /// details | 👀 Full file preview -//// tab | Python 3.10+ - -```Python -{!./docs_src/tutorial/connect/insert/tutorial001_py310.py!} -``` - -//// - -//// tab | Python 3.7+ - -```Python -{!./docs_src/tutorial/connect/insert/tutorial001.py!} -``` - -//// +{* ./docs_src/tutorial/connect/insert/tutorial001_py310.py *} /// @@ -63,57 +49,7 @@ Let's say that **Tommy Sharp** uses his "rich uncle" charms to recruit **Spider- Doing it is just like updating any other field: -//// tab | Python 3.10+ - -```Python hl_lines="8" -# Code above omitted 👆 - -{!./docs_src/tutorial/connect/update/tutorial001_py310.py[ln:29-30]!} - - # Previous code here omitted 👈 - -{!./docs_src/tutorial/connect/update/tutorial001_py310.py[ln:60-64]!} - -# Code below omitted 👇 -``` - -//// - -//// tab | Python 3.7+ - -```Python hl_lines="8" -# Code above omitted 👆 - -{!./docs_src/tutorial/connect/update/tutorial001.py[ln:31-32]!} - - # Previous code here omitted 👈 - -{!./docs_src/tutorial/connect/update/tutorial001.py[ln:62-66]!} - -# Code below omitted 👇 -``` - -//// - -/// details | 👀 Full file preview - -//// tab | Python 3.10+ - -```Python -{!./docs_src/tutorial/connect/update/tutorial001_py310.py!} -``` - -//// - -//// tab | Python 3.7+ - -```Python -{!./docs_src/tutorial/connect/update/tutorial001.py!} -``` - -//// - -/// +{* ./docs_src/tutorial/connect/update/tutorial001_py310.py ln[29:30,60:64] hl[8] *} We can simply **assign** a value to that field attribute `team_id`, then `add()` the hero to the session, and then `commit()`.