From e1203ab9ab24169f4cdac1649032eb83ac63d522 Mon Sep 17 00:00:00 2001 From: Daniel Quinn Date: Sun, 13 Mar 2016 16:45:12 +0000 Subject: [PATCH] Allow ordering by date fields --- src/documents/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/documents/views.py b/src/documents/views.py index 6d56219f4..71d350e02 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -127,7 +127,8 @@ class DocumentViewSet(RetrieveModelMixin, ) filter_class = DocumentFilterSet search_fields = ("title", "correspondent__name", "content") - ordering_fields = ("id", "title", "correspondent__name") + ordering_fields = ( + "id", "title", "correspondent__name", "created", "modified") class LogViewSet(ReadOnlyModelViewSet):