Nafiul Islam
Nafiul Islam

Reputation: 82470

Autocomplete in Pycharm on templates

Whenever I make a function, make it a view and map a template onto it, the auto-complete in PyCharm works. If you type in something like {{ book. }}, where book is a model, and is one of your context objects, then it will give you a drop-down menu with possible completions.

However, if you make a class based view, then this does not work. Any way that I can fix this?

Upvotes: 4

Views: 2147

Answers (1)

Ahmet Erkan ÇELİK
Ahmet Erkan ÇELİK

Reputation: 2442

I solved a similar problem via a marginal method.

I'm using both PHPStorm and PyCharm and twig template engine most similar Tornado or DJango template engines syntax.

I've opened settings window/Plugins section. Clicked to "Install plugin form disk..." and selected ".../JetBrains/PhpStorm x.x/plugins/twig/lib/twig.jar"

Clicked "Ok" Clicked "Apply" And restarted "IDE"

template file name extension renamed to .twig and done!

pycharm tornado template endgine via twig plugin

Upvotes: 2

Related Questions