I'm responding to a thread over 60 days old:

 http://tinyurl.com/ycmj9l

Guillermo implies that a model should be easily shared
between Django applications via import.  However, if I
attempt to move Model class to a shared module, the
model won't validate.  For example:

 class ReferralType(models.Model):
     ...

 class ReferralSource(models.Model):
     referralType = models.ForeignKey(ReferralType)

Next, I move class ReferralType to ../share/models.py
and import it thus:

 from share.models import ReferralType

 class ReferralSource(models.Model):
     referralType = models.ForeignKey(ReferralType)

When I attempt to validate the model, the following error
appears:

referral.referralsource: 'referralType' has relation with model
ReferralType, which has not been installed
1 error found.

Note that the import is working, otherwise I would get one of the
following errors:

 "No module named share.models"
 "cannot import name ReferralType"

I'm using a recent dev build of Django.  Suggestions?

Jeff Bauer
Rubicon, Inc.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to