Building data-driven web apps with Flask and SQLAlchemy Transcripts
Chapter: Jinja2 templates
Lecture: Jinja2 autocomplete in PyCharm

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Now you may have picked up on the fact
0:01 that PyCharm was not treating our Jinja
0:04 templates with as much love as maybe
0:06 you'd expect PyCharm to treat it with.
0:09 Like here you can see there's no highlighting in here.
0:10 It says that end for is broken.
0:13 If I type that there's nothing
0:15 nothing that's helping me.
0:16 Right? No completion.
0:18 The reason is, this version of PyCharm
0:21 is a separate clean copy that I have
0:23 just for recording this video.
0:25 So it has to be activated for that.
0:28 So if you go over here to your
0:29 Language and Frameworks, Python Template Languages
0:33 the way it was set was, language was none.
0:35 Here you can set the default one.
0:36 I'm going to say Jinja2, pick Chameleon or whatever.
0:39 Whatever it is you want to work with?
0:41 I'm going to go with that. Say okay.
0:44 Now, notice we get this auto complete here.
0:47 We go like that, it auto completes.
0:48 We can say for p in packages.
0:52 We could do a double like that.
0:54 It'll expand it out.
0:55 So, very much nicer.
0:56 So for the rest of this class
0:59 just make sure that you have your
1:01 template language set to Jinja2
1:03 for this current project. Okay?
1:06 So if we have that, everything should be good
1:08 and we'll be getting a lot more help
1:10 and less pushback from PyCharm.