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


my python ide (pycharm) has stopped auto completing modules (suggestions). unresolved references after every django module try import so:

from django - works, add 'dot' fails from django.db import models gives me unresolved errors...

the ackward thing after compiling references work.

i discovered __init__.py files (everywhere) no longer marked python icon , notepad icons. opening init files in interpreter gives non-color marked text (no syntax highlighting). think python doens't recognizes these files.

my python interpreter python 2.6.1 django 1.2.4 , django installed under: /lib/python/2.6/site-packages (full directories, not egg)

when unfold sitepackages external libraries within ide see colored mark .py files except __init__.py files. hence thats issue lives.

(i have found posts on google similar problems no answers...)

i had same issue , couldn't find definitive answer. invalidating caches didn't work me. problem lies in fact that, @ point, __init__.py files got registered text files , messed indexing. worked out fix:

  • preferences > file types > text files.
  • remove __init__.py list of registered patterns. apply.
  • wait indexes re-build.
  • (if it's still not working) file > invalidate caches & restart.

Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -