A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
python code style
Michael Shamoond5018af2a3f1
diff --git a/src/documents/management/commands/document_exporter.py b/src/documents/management/commands/document_exporter.pyindex da00d10f5..1493bf078 100644--- a/src/documents/management/commands/document_exporter.py+++ b/src/documents/management/commands/document_exporter.py@@ -127,8 +127,11 @@ class Command(BaseCommand):serializers.serialize("json", DocumentType.objects.all()),)- manifest += json.loads(- serializers.serialize("json", Comment.objects.all())),+ manifest += (+ json.loads(+ serializers.serialize("json", Comment.objects.all()),+ ),+ )documents = Document.objects.order_by("id")document_map = {d.pk: d for d in documents}diff --git a/src/documents/models.py b/src/documents/models.pyindex cb64946c3..b2070d2f1 100644--- a/src/documents/models.py+++ b/src/documents/models.py@@ -538,16 +538,19 @@ class PaperlessTask(models.Model):)acknowledged = models.BooleanField(default=False)+class Comment(models.Model):comment = models.TextField(_("content"),blank=True,- help_text=_("Comment for the document")+ help_text=_("Comment for the document"),)created = models.DateTimeField(_("created"),- default=timezone.now, db_index=True)+ default=timezone.now,+ db_index=True,+ )document = models.ForeignKey(Document,@@ -555,7 +558,7 @@ class Comment(models.Model):null=True,related_name="documents",on_delete=models.CASCADE,- verbose_name=_("document")+ verbose_name=_("document"),)user = models.ForeignKey(@@ -564,7 +567,7 @@ class Comment(models.Model):null=True,related_name="users",on_delete=models.SET_NULL,- verbose_name=_("user")+ verbose_name=_("user"),)class Meta:@@ -573,4 +576,4 @@ class Comment(models.Model):verbose_name_plural = _("comments")def __str__(self):- return self.content\ No newline at end of file+ return self.content