Ricardo is correct. But make sure you use abstract model for Customer in this case. I use the AbstractUser a lot because in most cases the customers need to be system users and have a log in etc.
On 24 June 2014 02:08, Ricardo Daniel Quiroga <[email protected]> wrote: > Hi > mmmm I think I would do as follows :P > > #models.py code > > class Customer(model.Model): > *** > > class Transation(model.Model): > *** > customer = models.ForeignKey(Customer) > > > class Person(Customer): > *** > > class Corporation(Customer): > *** > > *** you object atributes > > > 2014-06-23 11:18 GMT-03:00 Eduardo Basílio <[email protected] > >: > > Hello, >> Can you help me on a question OO in Django? >> >> How the Transaction class can reference Person or Corporation? >> * Customer is an abstract class >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at http://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/26474e7c-f79e-416b-8569-9edb689dc191%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/26474e7c-f79e-416b-8569-9edb689dc191%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > ------------------------------------------------------------ > Ricardo Daniel Quiroga - L2Radamanthys > > Msn: [email protected] > [email protected] > > Email: [email protected] > [email protected] > [email protected] > > sitio Web: http://www.l2radamanthys.com.ar > http://github.com/L2Radamanthys > > Facebook: http://es-la.facebook.com/L2Radamanthys > Twitter: @l2Radamanthys > --------------------------------------------------------- > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAO2-wHa%3Da6%3Drz%3DXFoK%3DwCcqK8HPRhstDc3Mo2Dps0TpnNhgq2A%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAO2-wHa%3Da6%3Drz%3DXFoK%3DwCcqK8HPRhstDc3Mo2Dps0TpnNhgq2A%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHqTbj%3D7Os9AVbhqByPsY%2BEUT4BZFswP%3Db7m%2BkMepHJ1rtdZnA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

