I'm new to python and Flask, and I'm trying to setup a basic page to render an HTML template. I followed the instructions/tutorials and I'm able to render HTML via the use of render_template like so:
app = Flask(__name__)
@app.route('/')
def index():
return render_template(
'index.html',
)
I'm trying to now run a sample app, where the index.html in the app has actually a reference to another .html page, like so:
../../html/index.html
When I load this, I just see this text - literally. I assume it's trying to load the index.html from referenced folder (which I verified exists).
What is missing here? Am I missing a module or something?
EDIT:
This is where the main .py script is that I am running.
the index.html
is in the templates
directory. And then two folders up is the html
folder that it seems to be referencing:
I know based on this, it should be "../html/index.html
", but I've tried that, too and that doesn't work either.