Re: Custom Aggregate Objects

2009-02-03 Thread alex.gay...@gmail.com
On Feb 3, 1:29 pm, nsitarz wrote: > Well I've successfully subclassed the base aggregate class from > Russell above and it works as expected, however when I try and group > by my new aggregate field I get a FieldError. This makes sense to me > because when I call values on the queryset the new

Re: Custom Aggregate Objects

2009-02-03 Thread nsitarz
Well I've successfully subclassed the base aggregate class from Russell above and it works as expected, however when I try and group by my new aggregate field I get a FieldError. This makes sense to me because when I call values on the queryset the new field hasn't been created yet. Here's an exa

Re: Custom Aggregate Objects

2009-02-03 Thread nsitarz
Wow that was fast and is exactly what I was looking for :D Thanks, Nick. On Feb 3, 4:04 am, Russell Keith-Magee wrote: > On Tue, Feb 3, 2009 at 8:34 PM, Russell Keith-Magee > > > > wrote: > > On Tue, Feb 3, 2009 at 11:16 AM, alex.gay...@gmail.com > > wrote: > > >> On Feb 2, 9:05 pm, nsitarz

Re: Custom Aggregate Objects

2009-02-03 Thread Russell Keith-Magee
On Tue, Feb 3, 2009 at 8:34 PM, Russell Keith-Magee wrote: > On Tue, Feb 3, 2009 at 11:16 AM, alex.gay...@gmail.com > wrote: >> >> On Feb 2, 9:05 pm, nsitarz wrote: >>> Hey, >>> >>> Back when the ORM aggregate support was a patch in trac I used to >>> create custom aggregate objects that looked

Re: Custom Aggregate Objects

2009-02-03 Thread Russell Keith-Magee
On Tue, Feb 3, 2009 at 11:16 AM, alex.gay...@gmail.com wrote: > > On Feb 2, 9:05 pm, nsitarz wrote: >> Hey, >> >> Back when the ORM aggregate support was a patch in trac I used to >> create custom aggregate objects that looked like this: >> >> class Date(Aggregate): >> pass >> >> class DateH

Re: Custom Aggregate Objects

2009-02-02 Thread alex.gay...@gmail.com
On Feb 2, 9:05 pm, nsitarz wrote: > Hey, > > Back when the ORM aggregate support was a patch in trac I used to > create custom aggregate objects that looked like this: > > class Date(Aggregate): >     pass > > class DateHour(Aggregate): >     def __init__(self, lookup): >         super(DateHour