From d6468f9e2e6a4604900c10e7f6f9780756ff68c3 Mon Sep 17 00:00:00 2001 From: Francesco Luzzana Date: Sun, 13 Mar 2022 12:18:40 +0100 Subject: [PATCH] generate blueprint --- postit/generate.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/postit/generate.py b/postit/generate.py index fe6eeeb..2b77607 100644 --- a/postit/generate.py +++ b/postit/generate.py @@ -1,24 +1,16 @@ from flask import Blueprint, render_template import json - from . import dump - bp = Blueprint("generate", __name__, url_prefix="/generate") -def generate(): - pass - - @bp.route("/") def postit(): dump.dump() - return "hello" - - # with open("contents.json", "r") as f: - # contents = json.load(f) + with open("postit/contents.json", "r") as f: + contents = json.load(f) - # return render_template("postit.html", contents=contents) + return render_template("postit.html", contents=contents)