Probably fixed problem with finding the root of flask up (gotta change gunicorn settings)
This commit is contained in:
parent
f35f7f4335
commit
fb1497f670
@ -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
|
@ -26,6 +26,6 @@ def llpsi():
|
||||
|
||||
@app.route('/llpsi/<path:pensum_id>')
|
||||
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())
|
||||
|
Loading…
Reference in New Issue
Block a user