IntelliJ IDEA
 
Get IntelliJ IDEA
You are viewing the documentation for an earlier version of IntelliJ IDEA.

Add Django templates

Last modified: 10 August 2022

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 & 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 templates is not supported.