django aggregation to lower resolution using grouping by a date range

后端 未结 4 714
南旧
南旧 2021-01-05 07:18

horrible title, but let me explain: i\'ve got this django model containing a timestamp (date) and the attribute to log - f.e. the number of users consuming some ressource -

4条回答
  •  伪装坚强ぢ
    2021-01-05 07:56

    have you looked at the range filter?

    https://docs.djangoproject.com/en/dev/ref/models/querysets/#range

    The example given in the doc's seems similar to your situation.

提交回复
热议问题