H
H
Human2012019-01-08 12:28:29
Flask
Human201, 2019-01-08 12:28:29

Why doesn't Flask see templates?

Created a folder templates, threw the index.html file there with markup
Created a couple of files, everything seemed to work until it got to the point where I created view.py
The view.py file itself looks like this:

from app import app
from flask import render_template
@app.route('/')
def index():
    return render_template('index.html')

And where I call it, the file looks like this:
from app import app
import view
if __name__ == '__main__':
    app.run()

But the browser has a Not Found error. Tell me, please, how to fix this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question