Django&bootstrap based web app part of PoolTracker project. Reads data from PoolTracker mysql database, puts it on line chart and does some calculations.
- occupancy live chart for current day (for my observed pools it's from 6:00 AM)
- mean occupancy chart for each weekday from last 60 days (updated every day), day is selectable, default it's current day
- max lines showing max pool cap
- charts are zoomable, right click brings back to standard view
- dashboard showing % occupancy live for each pool, colouring red when it's over 80%, green when below
- Use latest python, install pip requirments
pip install django pymysql plotly pandas
- Clone repo
git clone https://github.com/avrland/PoolTrackerWeb.git
- Generate django secret key.
from django.core.management.utils import get_random_secret_key
print(get_random_secret_key())
- Insert mysql credentials (the same as for PoolTracker scrapper part and secret key.
{
"NAME": "...",
"USER": "...",
"PASSWORD": "...",
"HOST": "...",
"PORT": "...",
"SECRET_KEY": "..."
}
- Run django server
python manage.py runserver 0.0.0.0:80
docker image build -t pooltrackerweb .
docker container run -d -p80:8000 --restart unless-stopped --name pooltrackerweb pooltrackerweb
PoolTrackerWeb/
tablechart/
chart_app/ <- main django app
tablechart/ <- core of django project
templates/ <- html templates
static/ <- all static assets
- info that current day is more or less ocupated that average
- ML model predicting occupancy for rest of the day (need way more data)
choose slimer python images for docker- weather module, gathering info to link occupancy trends with bad/good weather
clickable popup window with info about poolsSSL cert as browser don't like sites without itstats chart for each day
- Frontend from template bootstrapmade.com
- Favicon www.flaticon.com