I'm having issues creating migrations for injected fields when Django 1.6.1
is installed (running python 2.7.5 and Mezzanine 3.0.4 on OS X 10.9).
I have this:
EXTRA_MODEL_FIELDS = (
(
"mezzanine.blog.models.BlogPost.featured_video",
"TextField",
("Featured video",),
{"blank": True},
),
)
and when I run schemamigration I get:
File "manage.py", line 29, in <module>
execute_from_command_line(sys.argv)
File ".../site-packages/django/core/management/__init__.py", line 399, in
execute_from_command_line
utility.execute()
File ".../site-packages/django/core/management/__init__.py", line 392, in
execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File ".../site-packages/django/core/management/base.py", line 242, in
run_from_argv
self.execute(*args, **options.__dict__)
File ".../site-packages/django/core/management/base.py", line 285, in
execute
output = self.handle(*args, **options)
File ".../site-packages/south/management/commands/schemamigration.py",
line 158, in handle
action = action_class(**params)
File ".../site-packages/south/creator/actions.py", line 232, in __init__
is_null = self.field.null
AttributeError: 'RelatedObject' object has no attribute 'null'
I also tried one of the fields that is present but commented out in the
default settings:
EXTRA_MODEL_FIELDS = (
(
"mezzanine.pages.models.Page.another_field",
"IntegerField", # 'django.db.models.' is implied if path is omitted.
("Another name",),
{"blank": True, "default": 1},
),
)
it produces the same error.
If I downgrade to Django 1.5.5 I can create the migration and once the
migration is created I can run it with 1.5.5 or 1.6.1. It's also a little
odd that the migration that gets created by south alters rating, keywords
and comments on blogpost.
Does anyone have any ideas about that?
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.