On Aug 13, 9:51 am, Steven Davidson <[email protected]> wrote: > Hmm, I can't fathom it. > > I would opt for a single simple query that returns a little more than you > need and post-process it in python. This would be more maintainable than a > hairy ORM query, I'd say; but if you have vast numbers of results that may > not be appropriate. > > Alternatively, and presuming you can't add and keep up to date an > 'is_current' (or whatever) column in the database to make the status of a > given State explicit, you could construct a database view which computes > this flag instead, backed by a different model with Options.managed = False. > > That's the view from my armchair, anyway! > Steven.
Thanks - yeah if I can't figure it out I may have to go for adding another field into the model. It would have to be another datetime field rather than an is_current flag because an is_current flag wouldn't help me for queries in the past (if that makes sense). -- 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.

