views:

41

answers:

1

I've got a Django project on my machine and when I try to use South to migrate the data schema, I get several odd errors. Example:

$ python manage.py convert_to_south thisLocator

/Library/Python/2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha >module is deprecated; use the hashlib module instead import sha /Users/cm/code/thisLocator/../thisLocator/batches/models.py:6: DeprecationWarning: the md5 >module is deprecated; use hashlib instead import md5

There is no enabled application matching 'thisLocator'.

I've followed the South documentation. Settings.py has it in the installed apps, I can run import south from the manage.py shell. Everyone else on my team is calling the app thisLocator.

Am I doing something really stupid?

+1  A: 

Am I doing something really stupid?

Well, let's start with the "is it plugged in" questions:

  • Is your project directory in your Python path?
  • Are you running python manage.py and not, say, python some/path/i/am/omitting/manage.py? (This is a great way to not have the project in the Python path.)
  • What is the output of ./manage.py syncdb? (I use ./manage.py instead of python manage.py just in case they refer to different pythons.)
Mike DeSimone
Mike, thanks for the response. I ended up nailing it. The app is organized in a somewhat unconventional way with multiple subdirectories. I was able to find the different models.py in various files and cobble together the migration.
christmasgorilla
Well, you solved *my* problem! I was in the wrong directory >.<
Mark
I've taken to putting `sys.path.append(os.path.dirname(__file__))` in my `manage.py` (and my `django.wsgi` and anything else that runs the project). That way, I can run it from everywhere.
Mike DeSimone