Hallo
I have two applications in a project. One of the the field in one
application is a "choice" field. The content of this choice field has
to be assigned by some attribute of other application's field. With an
example it will be more clear to explain it.
Two applications: A and B in a project (g2ps).
In application A I have defined a model in which one filed is a
choice:
from nlscia.contactinfos.models import Contactinfo
class Dataset(models.Model):
..
contactID = models.IntegerField(choices=[(f.contactID, '%s: %s, %s
%s' %
(f.contactID,
f.givenName,f.surName,
f.organizationName))
for f in
Contactinfo.objects.all()])
....
And in application B I have defined the "Contactinfo"
class Contactinfo(models.Model):
contactID = models.IntegerField(primary_key=True)
givenName = models.CharField(unique=True, maxlength=100)
surName = models.CharField(unique=True, maxlength=100)
organizationName = models.CharField(maxlength=100)
....
...
....
But what is actually the problem? If I change or add some information
in one of the 'Contactinfo" field and back to other application to see
this changing, I don't see any changing in 'choice' list in other
model. Only I can see this changing if start again the server. Isn't
it possible without any redesign of data model? I mean to redefine
data model based on some relationship as 'Foreignkey' or 'ManytoMany'
for example.
Cheers,
Nader
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---