Friday, September 11, 2015

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

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+unsubscribe@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.

No comments:

Post a Comment