PyDev and Django: Autocomplete not detecting Django?

徘徊边缘 提交于 2019-12-10 17:40:08

问题


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),

  1. make sure ..lib/site-packages is listed.
  2. Remove any mention of lib/site-packages/Django


来源:https://stackoverflow.com/questions/2815094/pydev-and-django-autocomplete-not-detecting-django

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!