While migrating I get an exception: File "/[...]python2.7/site-packages/django/db/models/fields/related.py",line 861, in get_related_field data = self.to._meta.get_field_by_name(self.field_name)AttributeError: 'str' object has no attribute '_meta'

So the problem is that South seems not to resolve the str'licenses.License'. Am I wrong?How to work around that?

Changing the custom field in django-licenses to from licenses.models import License ForeignKey.__init__(self, License, **kwargs)works just fine.

South does attempt to do this - the error can occur, though, if the licenses application is not frozen in the migration along with the field. Does the generated migration file have a 'licenses.license' entry in the big dict at the bottom?

On Tuesday, 17. April 2012 at 12:42, Frank Becker wrote:> > > > > > I just pushed that file to github. Please have a look yourself.> > > https://github.com/a8/django-podcasting/commit/a24ede325398f1d44d5e507d5126e0da875de0e3> > > I am not 100% sure which dict you mean. Somewhere in the middle there is an entry> > > in the models dict.> > > > > > > > > > > > Hmm, it looks fine to me there. I'm afraid I don't see what the problem > > is (provided you're running the latest South - we've had this issue a > > couple of times before but fixed it).> > > > If you can reduce it to a simple test case (i.e. two models in a simple > > app), then I'd suggest filing a bug report with that.> > > > OK, I'll try that. South is 0.7.4, Django 1.4.