PyCharm can't find Flask template that exists

Viewed 1968

PyCharm's code editor shows the popup message Template file 'index.html' not found when passing "index.html" to render_template. The template templates/index.html exists. Accessing http://localhost:5000/ renders the template. How do I tell PyCharm that the template exists?

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

enter image description here

1 Answers
Related