From bb31be8c6a5d5a97c15e48da3fb1563e18475d12 Mon Sep 17 00:00:00 2001 From: tenzi Date: Fri, 16 Jan 2026 16:59:17 +0100 Subject: [PATCH] notes du jour json --- 2026-01-16.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/2026-01-16.md b/2026-01-16.md index c02155b..baa6de8 100644 --- a/2026-01-16.md +++ b/2026-01-16.md @@ -3,6 +3,7 @@ ctrl r recherche dans historique commande uvicorn app:app --reload --host 0.0.0.0 --port 8000 MVC : Model(Ordinateur, utilisateurs) Vue(Dashboard) Controller(app.py --> /endpoint) +##VUE JSON --------------------------------- On va lier les deux fichiers @@ -15,3 +16,22 @@ transformer la data, on va modifier init dans ordinateur py ''' = commenter en python un zone de texte ajout data dans app.py + +deprycated : code qu'on n'utilise plus? en anglais + +------------------------------ + +Création nouveau route : get dans app.py + +------------------------------- +1. activate source +2. uvicorn +3. launch grabber +4. check http://localhost:8000/ordi1 + +---------------------------------- +faire un template html :D +avec Jinja2 pip install jinja2 +voir site "fastapi jinja2 template" + +ex:

{{ordi.hostname}}