Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PyCharm support Jinja2?

A bottle project of mine uses Jinja2. PyCharm does not automatically recognize it and shows such lines as errors. Is there a way to make Jinja2 work?

like image 539
k0pernikus Avatar asked Apr 01 '13 19:04

k0pernikus


People also ask

What is the difference between Jinja and Jinja2?

Jinja, also commonly referred to as "Jinja2" to specify the newest release version, is a Python template engine used to create HTML, XML or other markup formats that are returned to the user via an HTTP response.

Does Django use Jinja2?

Jinja is officially supported by Django, and even before that there were third-party packages that allowed you to use it. The only real compatibility issue is that you can't use Django's custom template tags in a Jinja template.


2 Answers

In the pro edition, these template languages:

  • Jinja2
  • Django
  • Mako

are supported. You can configure the template language in the project's settings:

In Python Template Settings the template langauge is set to Jinja2

The community edition may lack certain template languages.

like image 138
k0pernikus Avatar answered Sep 20 '22 13:09

k0pernikus


I think it's worth to mention that PyCharm Community edition does not support Jinja2, Mako and Django. It's available only in PyCharm Professional.

See comparison of the two.

like image 42
Stan Prokop Avatar answered Sep 20 '22 13:09

Stan Prokop