ARV
ARV

Reputation: 6907

IntelliJ IDEA Python plugin - how to make it treat HTML files as Django templates?

I am using IntelliJ IDEA 13 Ultimate edition with its Python plugin. I opened an existing folder containing a Django project (which I had created using Vim) as an IntelliJ project and enabled the Django facet manually on it. However, my HTML files are still being treated as plain HTML files - Django template tags and syntax aren't recognized. I recall that Django templates were automagically recognized by IntelliJ in an earlier project, but can't reproduce it now.

How can I get IntelliJ to recognize my template files as Django templates, please?

Upvotes: 7

Views: 2405

Answers (1)

Matthew Cornell
Matthew Cornell

Reputation: 4184

Here's how I did it on IntelliJ IDEA 14 for Jinja2 templates (similar to Django): Settings > Languages & Frameworks > Python Template Languages: Select "HTML files" in the list and choose "Jinga2" for Template Language.

Upvotes: 14

Related Questions