[Fixed]-PyCharm does not resolve templates nor template tags nor statics in Django project


Please try this – it works for me for templates:

  • set templates directories in Python Template Languages -> Template directories
  • in Project Structure mark your apps as Source Folders

After a project structure reorganization I had problem with static files again. Setting destination of setting.py file in Django Support -> Settings resolved the issue.



Right click on the templates directory and “Mark Directory As” -> “Template Directory” and select template language as django


I’ve solved this problem by editing settings for Django framework, as seen on a picture.


You need to set up your project properly.

Django Set Up

In Preferences | Languages & Frameworks | Django, Enable Django Suport, set up the path to your project’s root, settings.py file, and manage.py file:

enter image description here

Mark your templates directory as Templates

In File | Settings | Project Structure for Windows/Linux and
PyCharm | Preferences | Project Structure for macOS, choose the directory to be marked as a template root.

enter image description here

Click on Templates on Mark as.

enter image description here

  1. Click on OK to apply the changes you made.


The issue for me was that I was doing this in my settings module:


This caused PyCharm to think that debug_toolbar is the only app in the entire project. Declaring INSTALLED_APPS in the standard way solved it.


Leave a comment