Malcolm Tredinnick wrote: > Not very easily at the moment, no. You would need to look at creating a > subclass of QuerySet and overriding the _get_sql_clause() method to add > in a GROUP BY clause. So it's not impossible, just inelegant (a lot of > code duplication involved). > > You can't even fake it with the extra() method, because the "extra" > stuff is added at the front of the where clause, not the end. thats a pity... but...
> > There's a change to the internals of query generation coming "real soon > now" (a week or two, maybe) that will make this easier: a side-effect of > query generation rewriting is adding the ability to have things like > GROUP BY and HAVING clauses to query sets for those who want to subclass > them -- it will be for advanced use only and not exposed via the > QuerySet interface, but will be available for those who want to dive > into the code and subclass things. thanks for that great news!!! regards, skink --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---