2011/4/18 Kenneth Gonsalves <law...@thenilgiris.com>: > hi, > > I have two models.py files in two applications. Say, products.models and > incident.models. > > In incident I can do: from products.models import Product > but in products if I do: > from incident.import Something - this fails and django says cannot > import Something. > > Is there any way around this?
from django.db.models import get_model Product = get_model('products', 'Product') Something = get_model('incident', 'Something') Regards, -- Fabián E. Gallina http://www.anue.biz -- 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.