notes du jour json
This commit is contained in:
parent
02c54c434e
commit
bb31be8c6a
@ -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: <h2>{{ordi.hostname}}</h2>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user