A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Merge branch 'master' into dev
Jonas Winkler421dab786d49
diff --cc requirements.txtindex 818b33a48,f870ae3a6..64201f9d7mode 100755,100644..100644--- a/requirements.txt+++ b/requirements.txt@@@ -17,33 -18,33 +18,34 @@@ django==2.0.1djangoql==0.12.3djangorestframework==3.9.1docopt==0.6.2- docutils==0.14- execnet==1.5.0+ docutils==0.15.2+ execnet==1.6.1factory-boy==2.11.1- faker==1.0.2- filelock==3.0.10+ faker==2.0.0+ filelock==3.0.12filemagic==1.6fuzzywuzzy[speedup]==0.15.0- gunicorn==19.9.0+ gunicorn==20.0.4idna==2.8imagesize==1.1.0+ importlib-metadata==0.19inotify-simple==1.1.8; sys_platform == 'linux'- jinja2==2.10+ jinja2==2.10.1langdetect==1.0.7+ markupsafe==1.1.1+ more-itertools==7.2.0+numpy==1.15.1- markupsafe==1.1.0- more-itertools==5.0.0- packaging==19.0+ packaging==19.1pdftotext==2.1.1pillow==5.4.1- pluggy==0.8.1+ pluggy==0.12.0ply==3.11- psycopg2==2.7.7- py==1.7.0+ psycopg2==2.8.4+ py==1.8.0pycodestyle==2.4.0- pygments==2.3.1+ pygments==2.4.2pyocr==0.5.3- pyparsing==2.3.1+ pyparsing==2.4.2pytest-cov==2.6.1pytest-django==3.4.5pytest-env==0.6.2diff --cc src/documents/consumer.pyindex 5e95421cc,282b688b1..54979156amode 100755,100644..100755--- a/src/documents/consumer.py+++ b/src/documents/consumer.pydiff --cc src/documents/models.pyindex bd5cf161b,f051e3062..f14f8bd20mode 100755,100644..100755--- a/src/documents/models.py+++ b/src/documents/models.py@@@ -167,15 -256,14 +169,23 @@@ class Document(models.Model)added = models.DateTimeField(default=timezone.now, editable=False, db_index=True)+ filename = models.FilePathField(+ max_length=256,+ editable=False,+ default=None,+ null=True,+ help_text="Current filename in storage"+ )++ archive_serial_number = models.IntegerField(+ blank=True,+ null=True,+ unique=True,+ db_index=True,+ help_text="The position of this document in your physical document "+ "archive."+ )+class Meta:ordering = ("correspondent", "title")diff --cc src/documents/templates/admin/documents/document/change_form.htmlindex a255006eb,6edcbf2b1..80595a0e2--- a/src/documents/templates/admin/documents/document/change_form.html+++ b/src/documents/templates/admin/documents/document/change_form.html@@@ -12,28 -3,11 +12,32 @@@{% block content %}{{ block.super }}+ <div class="side-preview">+ <h2>Preview</h2>+ <object data="/fetch/preview/{{object_id}}"></object>+ </div>+{% if file_type in "pdf jpg png" %}++ <div id="change_form_twocolumn_parent">+ <div id="change_form_form_parent"></div>+ <div id="change_form_viewer_parent">+ {% if file_type == "pdf" %}+ {% include "admin/documents/document/viewers/viewer_pdf.html" %}+ {% endif %}+ {% if file_type in "jpg png" %}+ {% include "admin/documents/document/viewers/viewer_image.html" %}+ {% endif %}+ </div>+ </div>++ <script>+ django.jQuery("#change_form_form_parent").append(django.jQuery("#document_form"));+ django.jQuery("#content-main").append(django.jQuery("#change_form_twocolumn_parent"));+ </script>++{% endif %}+{% if next_object %}<script type="text/javascript">//<![CDATA[(function($){diff --cc src/documents/views.pyindex 5b819b9ba,aca849c70..f318d9b28mode 100755,100644..100755--- a/src/documents/views.py+++ b/src/documents/views.pydiff --cc src/paperless/urls.pyindex b74d821f4,4ab19b06f..d208b3470mode 100755,100644..100755--- a/src/paperless/urls.py+++ b/src/paperless/urls.py