image template
This commit is contained in:
10
app.py
10
app.py
@@ -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)
|
||||
Reference in New Issue
Block a user