Maybe a generic foreign key would solve your problem. http://www.djangoproject.com/documentation/models/generic_relations/
On Aug 24, 7:38 am, Mikoskay <[email protected]> wrote: > Hi, > > I'm searching for something like C++ union of types for my Django > models. I know I can do it by low-level fun, but I really hope it's > not necessary. > For example: I've got Transaction model which has a Client field - a > ForeignKey to Company model OR to Individual model - depending on what > I choose. How to do it in Django? > > Thanks for your time, --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

