Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Allow ordering by date fields

Daniel Quinne1203ab9ab24
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):