Server - Contents

SQL-Ledger linked to Flask Website PartC

new: 17-Apr-2025

Having assure the database link and selected the parts in SQL-Ledger for viewing in the website together with the appropriate entries (eg. values for Listprice etc.), we now resume from Part A to complete a very basic Flask website, demonstrating how the products can be displayed.

(.venv) sammy@imega:~/myproject$ mkdir -p templates static
(.venv) sammy@imega:~/myproject$ mkdir static/images -upload product images here
(.venv) sammy@imega:~/myproject$ nano app.py see below
(.venv) sammy@imega:~/myproject$ nano templates/index.html see link below
(.venv) sammy@imega:~/myproject$ python3 app.py

the app.py

View here the index.html

Open the browser at: http://localhost:5000 or http://[MyIP/Domain]:5000 It is the basis to develop a more elaborate one. The complete app can be downloaded in this zipped file:

View here the sqlflk.zip [22Kb]
With that said, a more elaborate effort made in the same context of the 3-Page Flask app 3-Page Flask app here is the second example: sqlflk2.zip [37Kb]

To deploy this Flask app will be the same process as described for the 3-Page Flask app: PartB

SQL-Ledger/Flask SQL-Ledger/Flask-PartB
SQL-Ledger/Flask-Deploy