[PATCH] Allow ordering events by date

Stephen Finucane stephen at that.guru
Sun Dec 1 04:00:17 AEDT 2019


On Tue, 2019-10-15 at 17:30 -0400, Jeremy Cline wrote:
> By default, the events API orders events by date in descending order
> (newest first). However, it's useful to be able to order the events by
> oldest events first. For example, when a client is polling the events
> API for new events since a given date and wishes to process them in
> chronological order.
> 
> Signed-off-by: Jeremy Cline <jcline at redhat.com>

I've gone ahead and applied this. It was possible to ignore the 'order'
key by subclassing 'rest_framework.filters.OrderingFilter' but that
change invovled way more boilerplate than I was comfortable with.
Thanks for the change and sorry it took so long to merge.

Stephen



More information about the Patchwork mailing list