PyCharm 2017.2 Help

Defining Template Directories

This feature is supported in the Professional edition only.

Project creation

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

Using the Project Structure page

To define template directories

  1. Open the Settings dialog, and click the Project Structure page.
  2. Choose the directory to be marked as a template root.
  3. Do one of the following:
    • Click /help/img/idea/2017.2/template_folder_icon.png on the toolbar of the Content roots pane.
    • Choose Templates on the directory's context menu.

Using the Project tool window

To mark a folder as a template directory

  1. In the Project Tool Window, right-click the desired directory.
  2. On the context menu, choose Mark Directory As, and then click the checked command Template Directory.

    This results in adding the marked directory to the list of template directories in the Project Structure page.

Last modified: 26 October 2017

See Also