A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
fixes #196
jonaswinkler6d4aa76405c2
diff --git a/src/documents/views.py b/src/documents/views.pyindex ddf02f534..32b88a18f 100755--- a/src/documents/views.py+++ b/src/documents/views.py@@ -5,6 +5,7 @@ from time import mktimefrom django.conf import settingsfrom django.db.models import Count, Max, Case, When, IntegerField+from django.db.models.functions import Lowerfrom django.http import HttpResponse, HttpResponseBadRequest, Http404from django.views.decorators.cache import cache_controlfrom django.views.generic import TemplateView@@ -68,7 +69,7 @@ class CorrespondentViewSet(ModelViewSet):queryset = Correspondent.objects.annotate(document_count=Count('documents'),- last_correspondence=Max('documents__created')).order_by('name')+ last_correspondence=Max('documents__created')).order_by(Lower('name'))serializer_class = CorrespondentSerializerpagination_class = StandardPagination@@ -87,7 +88,7 @@ class TagViewSet(ModelViewSet):model = Tagqueryset = Tag.objects.annotate(- document_count=Count('documents')).order_by('name')+ document_count=Count('documents')).order_by(Lower('name'))serializer_class = TagSerializerpagination_class = StandardPagination@@ -101,7 +102,7 @@ class DocumentTypeViewSet(ModelViewSet):model = DocumentTypequeryset = DocumentType.objects.annotate(- document_count=Count('documents')).order_by('name')+ document_count=Count('documents')).order_by(Lower('name'))serializer_class = DocumentTypeSerializerpagination_class = StandardPagination