I know django does not support STI, but I was wondering if there is
any way I can implement this behaviour.
Here is an example of what I would like:
class Tracker(models.Model):
notifications = models.ForeignKey(Notification)
class Notification(models.Model):
# Common fields
pass
class EmailNotification(Notification):
pass
class SmsNotification(Notification):
pass
# I would be able to iterate over all types of notification
for n in tracker.notifications:
print n
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---