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

Add Django templates

Last modified: 09 December 2022

Available only in PyCharm Professional: download to try or compare editions

PyCharm 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 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 PyCharm to debug them.