I'm working on a small project where it would be helpful to display trivial web pages. It's being developed in PyCharm, the pro edition.
This is an existing project, so it wasn't created as a Flask app to begin with.
I've added Flask to my requirements.txt and ensured that its installed. However, I don't get autocompletion of any Jinja templates - essentially, the HTML file I created is treated like dumb HTML.
How do I get PyCharm to recognize that I'm using Flask and to act accordingly?
You have to tell PyCharm which folders contain your templates.
Settings/Project: NAME/Project Structure
Templates
button.It will probably warn you that no template language is specified. If that is the case
Settings/Language & Frameworks/Python Template Languages
Template Language:
select your template language (jinja?)Template file types
select the file type (probably HTML)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With