Thanks for the suggestions. The "convert to list" approach sounded
appealing, but I had to get back a queryset since this was for an RSS
feed.

After reading up more, finally decided it might actually make more
sense to go with a bit of denormalization and create a "combined_date"
field on the model, with a custom save() method that keeps the right
thing in that new field.

    def save(self):
        if self.completed == True:
             self.combined_date = self.completed_date
        else:
            self.combined_date =  self.created_date

        super(Item, self).save()

That turned out to be trivial, gave me a single date field to sort on,
and kept everything in a queryset.

Thanks,
./s

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to