diff --git a/app/__init__.py b/app/__init__.py index de12fb5..cf9e256 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,7 +1,6 @@ from flask import Flask app = Flask(__name__) -app.config["SECRET_KEY"] = "asdasfgrwee" -app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///latin.sqlite" +print(app.template_folder) from app import routes \ No newline at end of file diff --git a/app/routes.py b/app/routes.py index d4bd2f8..49799b8 100644 --- a/app/routes.py +++ b/app/routes.py @@ -26,6 +26,6 @@ def llpsi(): @app.route('/llpsi/') def pensum(pensum_id): - filename = 'templates/Pensa/' + pensum_id + '.html' + filename = app.root_path + '/templates/Pensa/' + pensum_id + '.html' with open(filename, 'r') as file: return render_template('Pensum_cloze.html', pensum_title=pensum_id.replace('_', ' '), pensum_content=file.read())