Add Django templatesUltimate

Last modified: 19 May 2021

IntelliJ IDEA makes it possible to create and render templates written in one of the supported template languages:

It is important to note that one can edit templates without actually installing the template languages. However, in order to create or render templates, and navigate between views and templates, the corresponding template language should be properly installed.

Before making use of a certain template language, configure it in the Languages and Frameworks | Python Template Languages page of the Settings dialog and ensure that file types of any existing templates are properly recognized.

When creating a Django application, you can immediately specify a folder where templates will be stored.

You can make Django support skip some folders (disable Django language substitution), if you mark them as resources.

IntelliJ IDEA allows placing breakpoints to the lines of Django template files, at the lines with Django tags or expressions. If you want to trace back exceptions that are raised in course of template debugging, open   Breakpoints dialog,  and in the Django Exception Breakpoints tab, select the checkbox Suspend. Debugging Jinja and Mako templates is not supported.