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')


Result:

Traceback (most recent call last):
   File "<console>", line 1, in ?
   File "/home/mir/src/django_pop/../django_pop/email_admin/models.py", 
line 663, in ?
     class Person(models.Model):
   File "/home/mir/src/django_pop/../django_pop/email_admin/models.py", 
line 664, in Person
     from django_pop.email_admin.models import Ipkunde
ImportError: cannot import name Ipkunde


There's also another thread, about my problem, at

http://groups.google.com/group/django-users/browse_thread/thread/24a996f32de9c112/35e4a288a7337db9#35e4a288a7337db9

but there's only someone else stating the same problem and no solution :-(

Michael

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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