问题
I'm using PyDev with Django. The autocomplete works nicely in the shell - I start typing, and it suggests completions. However, this doesn't work in the main code editor window. How can I fix this?
I'm using:
Eclipse build #20100218-1602
PyDev 1.5.6
Eclipse IDE for Java Devs 1.2.2
回答1:
You might need to set the editor code completion settings. They are under:
Window->Preferences->PyDev->Editor->Code Completion
You might also need to add the Django install or your Django project to your path. You can set this under:
Window->Preferences->PyDev->Interpreter - Python
Hope this helps.
回答2:
Navigate to Window->Preferences->PyDev->Interpreters–>Python Interpreter
From Libraries (System PYTHONPATH),
- make sure ..lib/site-packages is listed.
- Remove any mention of lib/site-packages/Django
来源:https://stackoverflow.com/questions/2815094/pydev-and-django-autocomplete-not-detecting-django