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
|
from flask import Flask
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config["SECRET_KEY"] = "asdasfgrwee"
|
print(app.template_folder)
|
||||||
app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///latin.sqlite"
|
|
||||||
|
|
||||||
from app import routes
|
from app import routes
|
@ -26,6 +26,6 @@ def llpsi():
|
|||||||
|
|
||||||
@app.route('/llpsi/<path:pensum_id>')
|
@app.route('/llpsi/<path:pensum_id>')
|
||||||
def pensum(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:
|
with open(filename, 'r') as file:
|
||||||
return render_template('Pensum_cloze.html', pensum_title=pensum_id.replace('_', ' '), pensum_content=file.read())
|
return render_template('Pensum_cloze.html', pensum_title=pensum_id.replace('_', ' '), pensum_content=file.read())
|
||||||
|
Loading…
Reference in New Issue
Block a user