python3.11 -m venv venv --without-pip
source venv/bin/activate/
pip install flask flask-socketio
- run by
python main.py
where the flask app is running - templates must be in
template
folder in root. this is where your html templates will reside - templates must be in the
static
folder in root. This is where your static assets will reside - add cdnjs for socketio to head of html base page
- add blocks to inject code
<div class="content">
<!-- dynamically inject code -->
{% block content %}
{% endblock %}
</div>
- override blocks and inherit code using
{% extends 'base.html' %}
- add error messages by using if statement blocks
- session stores temporary data