tags:

views:

295

answers:

2

I'm trying to get South to work - it worked fine on my PC, but I'm struggling to deploy it on my webhost.

Right now it seems that any changes I make to add/remove items from INSTALLED_APPS aren't being picked up by syncdb or diffsettings. I've added south to my list of INSTALLED_APPS, but the tables it needs aren't being created when I run syncdb. If I change other settings, they are picked up, it just seems to be INSTALLED_APPS that doesn't work.

If I run

from south.db import db

from the shell I get with manage.py shell, I don't get any import errors, so I don't think it's a problem with where south is. I've tried removing all my other applications (other than the Django standard ones), and tables for them still get created when I run syncdb.

Even if I delete INSTALLED_APPS completely, I still get the old list of INSTALLED_APPS when I run manage.py diffsettings.

Any ideas what I've done wrong?

Thanks,

Dom

+3  A: 

If you write a migration for an application, syncdb wont work. You have to use

manage.py migrate

syncdb wont work for applications which are hooked under migration using south. Those applications model change will be noticed only depending on south migration history.

South Migration Docs

simplyharsh
That doesn't work, because south is not being picked up as being an installed app, so I get: Unknown command: 'migrate'.
Dominic Rodger
Thanks for the try though - +1ed
Dominic Rodger
A: 

The answer, it turns out, is that I'm a moron. I'd done this:

In settings.py:

...
INSTALLED_APPS = (
    ...
)
...

from localsettings import *

In localsettings.py

...
INSTALLED_APPS = (
    ...
)
...

I'd created localsettings.py from settings.py, to contain things only relevant to the current location of the project (like database settings), and forgot to delete the INSTALLED_APPS section.

Apologies for doing such a flagrantly stupid thing.

Dominic Rodger
oops!!! I guess that was the reason, the management command "migrate" was unknown. Coz south wasn't found in installed apps tuple.
simplyharsh