Hi, need a hand on this.
I have two applications, called accounting and enterprise, located in
myproject/accounting and myproject/enterprise. enterprise has a model
which has foreign keys in accounting. so I import it beforehand:
from django.models import accounting
class Company(meta.Model):
..
..
account = meta.ForeignKey(accounting.Account)
while accounting's Account has foreignkey at Company, so i also imported
enterprise before defining the model:
from django.models import enterprise
class Account(meta.Model):
..
..
company = meta.ForeignKey(enterprise.Company)
Knew it this is asking for problema, I can't get rid "ImportError:
cannot import name accounting". More over, I can't solve this even when
both of the model is inside the same application file, since the first
defined class model does not have its foreign key's class defined at the
time. I think this requires a lazy-fication.
--
dsw