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}}