equalium
unread,May 8, 2009, 6:29:14 AM5/8/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to South Users
Hello, i've just installed trunk version.
I'm trying to migrate an existing app, the 0001_initial.py is created,
but trying to fake it, i get:
Cannot successfully create field 'distribuidor' for model 'equipo':
name 'Distribuidor' is not defined.
I have edited 0001_initial.py adding:
from distribuidores.models import Empresa as Distribuidor
as model 'equipo' uses
equipos.equipo': {
...,
'distribuidor': ('models.ForeignKey', ['Distribuidor'],
{'null': 'True', 'blank': 'True'}),
...
'Distribuidor' is the imported name of the model 'empresa' from
another app.
But still get the same error.
This is the full sequence of the error:
./manage.py migrate equipos --fake
0001_initial
While loading migration 'equipos.0001_initial':
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/usr/lib/python2.5/site-packages/django/core/management/
__init__.py", line 359, in execute_manager
utility.execute()
File "/usr/lib/python2.5/site-packages/django/core/management/
__init__.py", line 304, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/lib/python2.5/site-packages/django/core/management/
base.py", line 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "/usr/lib/python2.5/site-packages/django/core/management/
base.py", line 222, in execute
output = self.handle(*args, **options)
File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/management/commands/migrate.py", line 84, in handle
skip = skip,
File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/migration.py", line 397, in migrate_app
tree = dependency_tree()
File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/migration.py", line 105, in dependency_tree
tree = all_migrations()
File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/migration.py", line 100, in all_migrations
for app in get_migrated_apps()
File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/migration.py", line 85, in get_migration
migclass.orm = FakeORM(migclass, get_app_name(app))
File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/orm.py", line 64, in __init__
self.retry_failed_fields()
File "/home/equalium/django/domains/dealer/ENV/lib/python2.5/site-
packages/south/orm.py", line 240, in retry_failed_fields
fname, modelname, e
ValueError: Cannot successfully create field 'distribuidor' for model
'equipo': name 'Distribuidor' is not defined.
Maybe this is not enough info to figure what's going on, but if
anybody has any idea of what can be wrong I'd appreciate any hint.
note: I am using south in a virtualenv.
Thank you.