List Info

Thread: manytomany polimorphic




manytomany polimorphic
user name
2006-06-29 13:44:20
I have a model similar to:

class ProductOne(models.Model):
   name = ...
   price = ...
   ...

class ProductTwo(models.Model):
   name = ...
   category = ...

Whatever two different models.

I want to log activity on this many models with a class like

class LogEntry(models.Model):
   timestamp = Date...
   action = choice...
   product = ManyToMany(ProductOne OR ProductTwo)

How can I have a product field in LogEntry that can points
to a
ProductOne object or to a ProductTwo?

thanks,   
J.R.


--~--~---------~--~----~------------~-------~--~----~
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 http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1]

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