Pycharm (Python IDE) doesn't auto complete Django modules Pycharm (Python IDE) doesn't auto complete Django modules python python

Pycharm (Python IDE) doesn't auto complete Django modules


I had exactly the same issue and couldn't find a definitive answer. Just invalidating caches didn't work for me. The problem lies in the fact that, at some point, __init__.py files got registered as text files and messed up the indexing. I worked out this fix:

  • Preferences > File Types > Text Files.
  • Remove __init__.py from the list of registered patterns. Apply.
  • Wait for your indexes to re-build.
  • (If it's still not working) File > Invalidate caches & restart.


GOTO File > Settings > Langauges & Frameworks > Python Template languages

Select Django in the Template language drop-down.

Jetbrains Docs > Python Template Languages


Nothing here worked for me but Enabling Django support in the settings did:

  1. Settings > Languages & Frameworks > Django
  2. Check of "Enable Django Support"
  3. Fill in the information for your project.