localwiki/localwiki — Issue #177: South schema migration doesn't work with pages app
Author: mivanov
Created: 2012-01-19 05:38:39+00:00
State: open

To reproduce:

1. Install South
2. Add it to INSTALLED_APPS
3. Run ``python manage.py convert_to_south pages``
4. Add a field to the Page model (I added a BooleanField called is_awesome).
5. Run ``python manage.py schemamigration pages --auto added_is_awesome_field``

Traceback (most recent call last):
File "/home/mivanov/localwiki/localwiki_messy/sapling/manage.py", line 60, in
main(set_apps_path=False)
File "/home/mivanov/localwiki/localwiki_messy/sapling/manage.py", line 57, in main
execute_manager(settings)
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/south/management/commands/schemamigration.py", line 97, in handle
old_orm = last_migration.orm(),
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/south/utils.py", line 62, in method
value = function(self)
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/south/migration/base.py", line 422, in orm
return FakeORM(self.migration_class(), self.app_label())
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/south/orm.py", line 46, in FakeORM
_orm_cache[args] = _FakeORM(*args)
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/south/orm.py", line 125, in __init__
self.models[name] = self.make_model(app_label, model_name, data)
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/south/orm.py", line 318, in make_model
field = self.eval_in_context(code, app, extra_imports)
File "/home/mivanov/localwiki/lw_env/lib/python2.6/site-packages/south/orm.py", line 236, in eval_in_context
return eval(code, globals(), fake_locals)
File "", line 1, in
File "/home/mivanov/localwiki/localwiki_messy/sapling/versionutils/versioning/fields.py", line 11, in __init__
return super(AutoUserField, self).__init__(User, **kws)
TypeError: __init__() got multiple values for keyword argument 'to'