image template

This commit is contained in:
m
2026-03-24 21:27:59 +01:00
parent 80c66c1802
commit 664900cbd1
4 changed files with 20 additions and 6 deletions

10
app.py
View File

@@ -1,4 +1,4 @@
from flask import Flask, render_template, request, redirect, url_for
from flask import Flask, render_template, request, redirect, url_for, send_from_directory
from content.posts import BLOG_POSTS
from flask_logic.logic import get_enriched_post, get_comments_for_post, save_comment
@@ -117,8 +117,16 @@ def post_detail(post_id):
return "Post not found", 404
comments = get_comments_for_post(post_id)
if post_id == 2:
return render_template('post_detail_test.html', post=post, comments=comments, blog_title = TITLE)
return render_template('post_detail.html', post=post, comments=comments, blog_title = TITLE)
@app.route('/content/image/<path:filename>')
def content_image_files(filename):
return send_from_directory('content/image', filename)
if __name__ == '__main__':
app.run(debug=True)