I have just installed South (0.7.3, python-2.6) and successfully completed the tutorial using the python interpreter. Meaning that I am able to create a model and migrate it without any errors, so South appears to be working fine in the python shell. I used an sqlite3 db for the tutorial.
However, when I open my project in Eclipse, Eclipse does not recognize the functions associated with db in the migration folders: 0001_initial.py and 0002_auto__add_field_knight_dances_whenever_able.py files. I get the specific errors ( Undefined variable from import: add_column, create_table, delete_column, delete_table, send_create_signal)
Up until the South install, Eclipse has been working fine for creating django apps. I did point the PyDev interpreter to the south folder under site-packages (C:\python26\Lib\site-packages\south-0.7.3-py2.6.egg) (Other libraries there such as Django and django-picklefield work fine.)
I ran a simple script from the eclipse project and from the python shell and both appear to have the same sys.path’s
Any tips on getting the Eclipse python interpreter happier?
One (far from ideal) solution is to put
#@PydevCodeAnalysisIgnorein all of your migrations. If you only have a few so far, you can do this manually. I had heaps, so I ran the following shell command, which will add the comment in as the second line of each file:(Note: You should probably run
find . | grep '^.\/[a-z]*\/migrations\/.*\.py$'to see which filessedwill alter, before running the whole command. You can also run the whole command without the-iflag to see the changes themselves.)