getting some ui and index route going

This commit is contained in:
2026-01-10 19:04:48 -07:00
parent 8e7512965c
commit 196873aac9
7 changed files with 133 additions and 0 deletions

18
weather/weather.py Normal file
View File

@@ -0,0 +1,18 @@
from flask import (
Blueprint, flash, g, render_template, request, url_for
)
from werkzeug.exceptions import abort
from weather.db import get_db
bp = Blueprint('weather', __name__)
@bp.route('/')
def index():
db = get_db()
periods = db.execute(
'SELECT *'
' FROM `periods`'
' ORDER BY `id` DESC'
).fetchall()
return render_template('weather/index.html', periods=periods)