diff options
| author | Morgana <Morgana@icolotl.com> | 2026-09-28 12:36:29 -0500 |
|---|---|---|
| committer | Morgana <Morgana@icolotl.com> | 2026-09-28 12:36:29 -0500 |
| commit | 9aa5bb1133985aa87bfe47d25f3ce139b05de2dd (patch) | |
| tree | 736803bcf243b017e1b3797ca2b5ab8c3b3902fe | |
| parent | 7fc188b0a4d73856c05eacc9bdf2a1561505a8d6 (diff) | |
Added news page
| -rw-r--r-- | app.py | 9 | ||||
| -rw-r--r-- | templates/news.html | 15 |
2 files changed, 24 insertions, 0 deletions
@@ -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 %} +<main class="centered"> + <h2>Drosera Springs eNewsletter</h2> + {% for article in news %} + <br> + <article> + <h3>{{ article.title }}</h3> + <small>Published {{ article.date }}</small> + <p>{{ article.content }}</p> + </article> + {% endfor %} +</main> +{% endblock %}
\ No newline at end of file |