From 9aa5bb1133985aa87bfe47d25f3ce139b05de2dd Mon Sep 17 00:00:00 2001 From: Morgana Date: Mon, 28 Sep 2026 12:36:29 -0500 Subject: Added news page --- app.py | 9 +++++++++ templates/news.html | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 templates/news.html diff --git a/app.py b/app.py index 79ad458..7869de9 100644 --- a/app.py +++ b/app.py @@ -124,3 +124,12 @@ def hydematch(): cur.execute("SELECT * FROM matches ORDER BY id DESC") results = cur.fetchall() return render_template("hyde.html", matches=results) + + +@app.route("/news") +def news(): + db = get_db() + cur = db.cursor() + cur.execute("SELECT * FROM news ORDER BY id DESC") + results = cur.fetchall() + return render_template("news.html", news=results) diff --git a/templates/news.html b/templates/news.html new file mode 100644 index 0000000..f2ada33 --- /dev/null +++ b/templates/news.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block content %} +
+

Drosera Springs eNewsletter

+ {% for article in news %} +
+
+

{{ article.title }}

+ Published {{ article.date }} +

{{ article.content }}

+
+ {% endfor %} +
+{% endblock %} \ No newline at end of file -- cgit v1.3.1