Check this out: http://www.python.org/doc/faq/programming/#what-are-the-best-practices-for-using-import-in-a-module
On Jan 11, 6:54 am, Josh Ourisman <[EMAIL PROTECTED]> wrote: > I have two models, modelA and modelB. ModelA needs classB1 and classB2 > from modelB, while modelB needs classA1 from classA. > > So, in the models.py file for modelA I have 'from modelB.models import > classB1, classB2'. This worked just fine until I added to the > models.py file for modelB 'from modelA.models import classA1' after > also adding the class B3 that needed to reference classA1. Now when I > try to syncdb it tells me that modelA cannot import class B1. > > Is there some particular reason that such cross-importing wouldn't be > possible? Do I need to use a different importing syntax or something? --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---