As always, thanks Steve. I haven't had a chance to try this out yet but hope to later on today.
On Tue, Dec 31, 2013 at 9:45 PM, Stephen McDonald <[email protected]> wrote: > Um that second commit was unrelated, it was these two: > > > https://github.com/stephenmcd/mezzanine/commit/2515af2d0a0fd5b444f62f46ee6c928df295224e > > https://github.com/stephenmcd/mezzanine/commit/2ceaeb685e314892ef50fa3a71e691c2a87e34c7 > > Basically there were a bunch of south hacks in mezzanine.generic that > allowed those fields to be included in migrations, and as I understood some > time ago this was necessary and all worked fine. With all the generic > relation field changes in Django 1.6.x though, these now break with South > when trying to create new migrations. The fix was to go back and edit those > migrations manually. I've also removed the old hacks that kept that > working, and I've been able to detect when invalid migrations (still > containing those fields) are being used, which you'll see in the first > commit provides a big warning. > > > On Wed, Jan 1, 2014 at 4:42 PM, Stephen McDonald <[email protected]> wrote: > >> Fixed just an hour ago: >> >> >> https://github.com/stephenmcd/mezzanine/commit/2515af2d0a0fd5b444f62f46ee6c928df295224e >> >> https://github.com/stephenmcd/cartridge/commit/9f8bb6603f44ee9e793b679ab223833fb5f21fd4 >> >> >> On Wed, Jan 1, 2014 at 4:21 PM, Josh Cartmell <[email protected]>wrote: >> >>> 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. >>> >> >> >> >> -- >> Stephen McDonald >> http://jupo.org >> > > > > -- > Stephen McDonald > http://jupo.org > > -- > 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. > -- 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.
