Flask + Jinja2 = where's autocomplete?

Hi.

I try to work in PyCharm with flask. So, i use jinja2 templates.

And i see strange autocomplete behavior:

1. {{}} set connect

2. {%%} - not auto and after last bracket it adds double one - it looks like {%%}}

3. No autocomplete for functions in delimiters.

3.1. At {{}} there are no auto at all

3.2. for {%%} there are autocomplete in some cases, and some are not.

4. {{ endblock }} delimiters and so on highlighting by spellchecker (it doesn't know it's special construction, not typo).

 

At pics you can see my project settings.

 

 

What's going on? Does IDE sees, it's a jinja-template or not?

PS: code stored at git hub.

https://github.com/Vhodnoylogin/Flask-from-youtube/tree/lesson_9

4 comments
Comment actions Permalink

Does File | Invalidate Caches / Restart | Invalidate and Restart help?

Try moving the templates folder to the project root and then back to Application.

Has any of it helped?

0
Comment actions Permalink

When i set templates folder to root - 2 and 4 issue were gone.

But it still can't autocomplete in brackets.

0
Comment actions Permalink

What do you mean by "set templates folder to root"? Did you move the templates folder to the project root or did you mark the project root as the Template folder?

Make sure File | Settings | Languages & Frameworks | Flask | Flask integration is enabled.

0
Comment actions Permalink

If u said "move" - i move. So, i moved template folder to project root. See:

 

 

And, of course, i use Flask integration from the beginning.

0

Please sign in to leave a comment.