On 25 Jun 2012, at 17:41, Soviet wrote:
> I'm new to this Django thing and I run into first problem :).
> 
> Let's say I have two models and in each I have field with ForeignKey
> relating to field in other model (hope it's clear). Now that I want to
> run migrate with South, I'm getting "NameError: name 'ModelName' is
> not defined". This is clearly (?) an issue with the fact that one
> model is on top of the other one and second Model hasn't been defined
> yet. Changing position of the models is, obviously, not helping. How
> do I approach this?

In the first of the two models, use a string containing the second model's name 
as the first argument to the ForeignKey method.

Regards,

aid

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to