Michael Radziej a écrit :
> Rock schrieb:
> 
>>Search for "forward reference" in this group. (Basically you cleverly
>>locate your import statement inside a function call.)
> 
> 
> I found your thread at:
> 
> http://groups.google.com/group/django-users/browse_thread/thread/71fc72ab1f547d3/4d0dbfdfd9dc8a05?q=%22forward+references%22&rnum=2#4d0dbfdfd9dc8a05
> 
> 
> No, unfortunately, this doesn't work within the class itself but only 
> within a def.
> 
> I tried, just to make sure, this:
> 
> class Person(models.Model):
>      from django_pop.email_admin.models import Ipkunde
>      ...
>      uremip = models.ForeignKey(Ipkunde, db_column='ipkunde')
> 
> class Ipkunde(models.Model):
>      ...
>      owner = models.ForeignKey(Owner, db_column='person')
> 


Err... This has nothing to do with your question, but are you sure your 
data model is right ? The owner foreign key in Ipkunde means that a 
Person has one or more Ipkunde, and the uremip foreign key in Person 
means that a Ipkunde has one or more Persons. Seems like you want a many 
to many relationship here (which by the would solve your problem).


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to