Re: Generating a timeseries and aggregation/annotation using QuerySet.extra()

2015-09-11 Thread Wannabe Coder
Alright I get it now! Thanks for the clarification! From the looks of it, 
being able to manipulate lhs and rhs can cover a lot of possible SQL 
statements in a very reusable way, though it will still be nice to have 
that kind of transform/expression available out-of-the-box, since I think 
it is a common use case. Any idea if the Django team will include that?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6dc140e2-1e48-40c2-857a-cfc7ae25fcac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Generating a timeseries and aggregation/annotation using QuerySet.extra()

2015-09-11 Thread Wannabe Coder
Alright I get it now! Thanks for the clarification! From the looks of it, 
being able to manipulate lhs and rhs can cover a lot of possible SQL 
statements in a very reusable way, though it will still be nice to have 
that kind of transform/expression available out-of-the-box, since I think 
it is a common use case. Any idea if the Django team will include that?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e2183b64-0cac-4e01-94f7-3ca2c4f266ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Generating a timeseries and aggregation/annotation using QuerySet.extra()

2015-09-11 Thread Wannabe Coder
Hello everyone!

I already created a ticket  
detailing my use case, and one of the developers pointed me to this 
discussion group. I am not quite satisfied with the response I got since 
the DateTransforms that will be released in Django 1.9 only appear to 
extract year/month/day/etc numbers and do not seem to be able to annotate 
based on generated time periods from a series of dates/datetimes. Basically 
what I can do with .extra() right now is generate a table like the ones 
shown in my screenshots.

I hope that behavior would be possible to customize or even include in 
Django 1.9 out of the box. Thanks!



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/796ec525-453e-4a04-892f-671744364fc5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.