List Info

Thread: Using a ForeignKey part of the time.




Using a ForeignKey part of the time.
user name
2006-11-23 16:00:48

I have a model called "transaction" in which one
of the fields in
called "source".

95% of the time I want "source" to be populated by
data from another
table using a ForeignKey- but not all of the time.

At the moment if I put in the Foreign Key I can only put the
related
table information into "source", via the Admin. 
If I don't put in the
Foreign Key then I don't get the reference to the other
table.

Is there an elegant way to handle this type of situation,
where you
need a Foreign Key for only part of the time?

MerMer


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )