Is there a way to concatenate model querysets and use the
concatenation as the basis for a date-based generic view? Or, would I
be able to mimic the generic view code but alter it in such a way that
it handles the concatenation?

(Each of the models would have a DateTimeField called "date")

E.g. (I'm not very familiar with Python, so forgive me if the last
couple lines look "wrong"):

class ThingA(models.Model):
    date = models.DateTimeField()
    content = models.TextField()

class ThingB(models.Model):
    date = models.DateTimefield()
    link = models.URLField()

class ThingC(models.Model):
    date = models.DateTimeField()
    note = models.CharField(maxlength=250)

a = ThingA.objects.all()
b = ThingB.objects.all()
c = ThingC.objects.all()

q = a + b + c
q.sort('date')


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to