Django, Eclipse, Autocomplete

25 views
Skip to first unread message

xpanta

unread,
Nov 16, 2010, 2:44:17 AM11/16/10
to Django users
Hi,

I am using eclipse Galileo (Build id: 20100218-1602) and PyDev to
build a Django project.

Autocompletion works fine for python language but not for django. For
example in models.py I cannot get the
field = models.CharField(max_length=100) to be autocompleted.

I have added path\to\python26\Lib\site-packages\django to my
PYTHONPATH variables (system-wide and project-specific).

what else should I do?

(PS. I didn't create the django project through eclipse. I created
using command line and then imported the project to eclipse later)

Any help would be appreciated,
Chris

Simone Dalla

unread,
Nov 16, 2010, 3:33:07 AM11/16/10
to django...@googlegroups.com


2010/11/16 xpanta <xpa...@gmail.com>

Preferences --> PyDev --> Interpreter Python --> Auto Config

this reconfigure the PYTHONPATH for Eclipse. If you have Django installed into your system, restart Eclipse and after autocompletion works fine.




--
Simo

- Registered Linux User #395060

- Software is like sex, it is better when it is free  --> Linus B. Torvalds

xpanta

unread,
Nov 16, 2010, 4:12:41 AM11/16/10
to Django users
Thanks a lot.

it seems to work, now :-)

I don't know why, but I also had to remove PYTHONPATH environment
variable (my computer -> properties -> etc...) in order for auto-
config to configure python-django properly...

Thanks again for your time,
Chris

Simone Dalla

unread,
Nov 16, 2010, 6:07:21 AM11/16/10
to django...@googlegroups.com


2010/11/16 xpanta <xpa...@gmail.com>

Thanks a lot.

it seems to work, now :-)

I don't know why, but I also had to remove PYTHONPATH environment
variable (my computer -> properties -> etc...)  in order for auto-
config to configure python-django properly...

Thanks again for your time,

De nada ;-) 

Recep KIRMIZI

unread,
Nov 16, 2010, 3:36:39 AM11/16/10
to django...@googlegroups.com
use vim and feel happy :D
here are the django template and model templates.
https://github.com/msanders/snipmate.vim


Pzt, 2010-11-15 tarihinde 23:44 -0800 saatinde, xpanta yazdı:

Reply all
Reply to author
Forward
0 new messages