A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
apply some patches from @brookst
dadosch91cecd47af81
diff --git a/requirements.txt b/requirements.txtindex 5f7a0f081..1e1158b31 100644--- a/requirements.txt+++ b/requirements.txt@@ -1,13 +1,13 @@-apipkg==1.4+apipkg==1.5attrs==18.1.0-certifi==2018.4.16+certifi>=2018.8.24chardet==3.0.4coverage==4.5.1-coveralls==1.3.0+coveralls==1.4.0dateparser==0.7.0django-cors-headers==2.4.0django-crispy-forms==1.7.2-django-extensions==2.0.7+django-extensions==2.1.0django-filter==2.0.0django-flat-responsive==2.0django>=2.0@@ -15,7 +15,7 @@ djangorestframework==3.8.2docopt==0.6.2execnet==1.5.0factory-boy==2.11.1-faker==0.8.15+faker==0.9.0filemagic==1.6flake8==3.5.0fuzzywuzzy==0.15.0@@ -27,7 +27,7 @@ mccabe==0.6.1more-itertools==4.1.0pdftotext==2.0.2pillow==5.1.0-pluggy==0.6.0+pluggy==0.7.1py==1.5.3pycodestyle==2.3.1pyflakes==1.6.0diff --git a/src/documents/migrations/0003_sender.py b/src/documents/migrations/0003_sender.pyindex ce2508994..d3aad9903 100644--- a/src/documents/migrations/0003_sender.py+++ b/src/documents/migrations/0003_sender.py@@ -32,7 +32,7 @@ def realign_senders(apps, schema_editor):class Migration(migrations.Migration):-+ atomic = Falsedependencies = [('documents', '0002_auto_20151226_1316'),]diff --git a/src/documents/migrations/0011_auto_20160303_1929.py b/src/documents/migrations/0011_auto_20160303_1929.pyindex af4ee4c66..7b77a8835 100644--- a/src/documents/migrations/0011_auto_20160303_1929.py+++ b/src/documents/migrations/0011_auto_20160303_1929.py@@ -6,7 +6,7 @@ from django.db import migrationsclass Migration(migrations.Migration):-+ atomic = Falsedependencies = [('documents', '0010_log'),]diff --git a/src/documents/migrations/0012_auto_20160305_0040.py b/src/documents/migrations/0012_auto_20160305_0040.pyindex 5168c9206..f1659f4a1 100644--- a/src/documents/migrations/0012_auto_20160305_0040.py+++ b/src/documents/migrations/0012_auto_20160305_0040.py@@ -112,7 +112,7 @@ def move_documents_and_create_thumbnails(apps, schema_editor):class Migration(migrations.Migration):-+ atomic = Falsedependencies = [('documents', '0011_auto_20160303_1929'),]diff --git a/src/documents/migrations/0014_document_checksum.py b/src/documents/migrations/0014_document_checksum.pyindex 167245dea..b58b9ebc1 100644--- a/src/documents/migrations/0014_document_checksum.py+++ b/src/documents/migrations/0014_document_checksum.py@@ -128,7 +128,7 @@ def do_nothing(apps, schema_editor):class Migration(migrations.Migration):-+ atomic = Falsedependencies = [('documents', '0013_auto_20160325_2111'),]diff --git a/src/documents/migrations/0019_add_consumer_user.py b/src/documents/migrations/0019_add_consumer_user.pyindex a3d7d787e..82670e53f 100644--- a/src/documents/migrations/0019_add_consumer_user.py+++ b/src/documents/migrations/0019_add_consumer_user.py@@ -15,7 +15,7 @@ def reverse_func(apps, schema_editor):class Migration(migrations.Migration):-+ atomic = Falsedependencies = [('documents', '0018_auto_20170715_1712'),]diff --git a/src/documents/migrations/0020_document_added.py b/src/documents/migrations/0020_document_added.pyindex dbddf80ae..485c04671 100644--- a/src/documents/migrations/0020_document_added.py+++ b/src/documents/migrations/0020_document_added.py@@ -12,7 +12,7 @@ def set_added_time_to_created_time(apps, schema_editor):doc.save()class Migration(migrations.Migration):-+ atomic = Falsedependencies = [('documents', '0019_add_consumer_user'),]diff --git a/src/paperless/settings.py b/src/paperless/settings.pyindex e40af01d1..dec20ec3c 100644--- a/src/paperless/settings.py+++ b/src/paperless/settings.py@@ -82,14 +82,13 @@ if os.getenv("PAPERLESS_INSTALLED_APPS"):-MIDDLEWARE_CLASSES = [+MIDDLEWARE = ['django.middleware.security.SecurityMiddleware','django.contrib.sessions.middleware.SessionMiddleware','corsheaders.middleware.CorsMiddleware','django.middleware.common.CommonMiddleware','django.middleware.csrf.CsrfViewMiddleware','django.contrib.auth.middleware.AuthenticationMiddleware',- 'django.contrib.auth.middleware.SessionAuthenticationMiddleware','django.contrib.messages.middleware.MessageMiddleware','django.middleware.clickjacking.XFrameOptionsMiddleware',]@@ -99,9 +98,9 @@ CORS_ORIGIN_WHITELIST = tuple(os.getenv("PAPERLESS_CORS_ALLOWED_HOSTS", "localho# If auth is disabled, we just use our "bypass" authentication middlewareif bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")):- _index = MIDDLEWARE_CLASSES.index("django.contrib.auth.middleware.AuthenticationMiddleware")- MIDDLEWARE_CLASSES[_index] = "paperless.middleware.Middleware"- MIDDLEWARE_CLASSES.remove("django.contrib.auth.middleware.SessionAuthenticationMiddleware")+ _index = MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware")+ MIDDLEWARE[_index] = "paperless.middleware.Middleware"+ MIDDLEWARE.remove("django.contrib.auth.middleware.SessionAuthenticationMiddleware")ROOT_URLCONF = 'paperless.urls'diff --git a/src/reminders/migrations/0002_auto_20180824_2018.py b/src/reminders/migrations/0002_auto_20180824_2018.pynew file mode 100644index 000000000..4056767bf--- /dev/null+++ b/src/reminders/migrations/0002_auto_20180824_2018.py@@ -0,0 +1,19 @@+# Generated by Django 2.1 on 2018-08-24 20:18++from django.db import migrations, models+import django.db.models.deletion+++class Migration(migrations.Migration):++ dependencies = [+ ('reminders', '0001_initial'),+ ]++ operations = [+ migrations.AlterField(+ model_name='reminder',+ name='document',+ field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='documents.Document'),+ ),+ ]diff --git a/src/reminders/models.py b/src/reminders/models.pyindex b34c455aa..64affaf77 100644--- a/src/reminders/models.py+++ b/src/reminders/models.py@@ -4,7 +4,7 @@ from django.db import modelsclass Reminder(models.Model):document = models.ForeignKey(- "documents.Document", on_delete=models.DO_NOTHING+ "documents.Document", on_delete=models.PROTECTION)date = models.DateTimeField()note = models.TextField(blank=True)