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

Add Django templates

Last modified: 29 November 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 section of the IDE settings Ctrl+Alt+S 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 also mark folders as template directories directly in the Project tool window:

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

After you create Django templates, you can use IntelliJ IDEA to debug them.