Compare commits

..

10 Commits

Author SHA1 Message Date
Jonas Winkler
c6a51a1cdc Version bump 2018-12-12 13:25:28 +01:00
Jonas Winkler
4b20d5d4b9 Fixed migration order 2018-12-12 13:13:21 +01:00
Jonas Winkler
cccd183c31 Fixed migration order 2018-12-12 13:11:30 +01:00
Jonas Winkler
1baa203ef2 Merge branch 'release-1.0.0' into dev 2018-12-11 22:58:14 +01:00
Jonas Winkler
c3ce05e1cd Merge branch 'master' into dev 2018-12-11 22:36:26 +01:00
Jonas Winkler
7659dde16c Merge remote-tracking branch 'origin/patch-1' into dev 2018-12-11 22:26:20 +01:00
Daniel Quinn
7b4785bdb9 Merge pull request #450 from erikarvstedt/fix-parser-test
Fix date test sample image
2018-12-11 11:43:14 +00:00
jonaswinkler
baf89cad8e Update 0022_auto_20181007_1420.py
copy paste error.
2018-12-10 18:38:19 +01:00
Erik Arvstedt
a19f0ef97e Fix date test sample image
The previous version of `tests_date_3.png` had too much spacing
between the `0` and the `8` glyphs, which resulted in the year getting
parsed as `200 8` in Tesseract 3.05.00 (+ tessdata 3.04.00).
This caused the date parsing test to fail.
2018-12-02 15:10:21 +01:00
Erik Arvstedt
ec7125b6bb Fix travis ocr languages
The tests need German language support for Tesseract
2018-12-02 15:10:20 +01:00
7 changed files with 16 additions and 41 deletions

View File

@@ -2,7 +2,7 @@ language: python
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq libpoppler-cpp-dev unpaper tesseract-ocr tesseract-ocr-eng tesseract-ocr-cat
- sudo apt-get install -qq libpoppler-cpp-dev unpaper tesseract-ocr tesseract-ocr-eng tesseract-ocr-cat tesseract-ocr-deu
sudo: false

View File

@@ -13,3 +13,8 @@ Changelog (jonaswinkler)
* Added: Inbox tags (added automatically to newly consumed documents)
* Added: Document viewer on document edit page
* Database backend is now configurable
1.0.1
=====
* Fixed migration order

View File

@@ -12,8 +12,9 @@ def re_slug_all_the_things(apps, schema_editor):
Tag = apps.get_model("documents", "Tag")
Correspondent = apps.get_model("documents", "Correspondent")
DocumentType = apps.get_model("documents", "DocumentType")
for klass in (Tag, Correspondent):
for klass in (Tag, Correspondent, DocumentType):
for instance in klass.objects.all():
klass.objects.filter(
pk=instance.pk
@@ -25,7 +26,7 @@ def re_slug_all_the_things(apps, schema_editor):
class Migration(migrations.Migration):
dependencies = [
('documents', '0021_document_storage_type'),
('documents', '1003_auto_20180904_1425'),
]
operations = [
@@ -48,5 +49,10 @@ class Migration(migrations.Migration):
name='slug',
field=models.SlugField(blank=True, editable=False),
),
migrations.AlterField(
model_name='documenttype',
name='slug',
field=models.SlugField(blank=True, editable=False),
),
migrations.RunPython(re_slug_all_the_things, migrations.RunPython.noop)
]

View File

@@ -6,7 +6,7 @@ from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('documents', '0022_auto_20181007_1420'),
('documents', '0021_document_storage_type'),
]
operations = [

View File

@@ -1,36 +0,0 @@
# Generated by Django 2.0.8 on 2018-10-07 14:20
from django.db import migrations, models
from django.utils.text import slugify
def re_slug_all_the_things(apps, schema_editor):
"""
Rewrite all slug values to make sure they're actually slugs before we brand
them as uneditable.
"""
DocumentType = apps.get_model("documents", "DocumentType")
for instance in DocumentType.objects.all():
DocumentType.objects.filter(
pk=instance.pk
).update(
slug=slugify(instance.slug)
)
class Migration(migrations.Migration):
dependencies = [
('documents', '1003_auto_20180904_1425'),
]
operations = [
migrations.AlterField(
model_name='documenttype',
name='slug',
field=models.SlugField(blank=True, editable=False),
),
migrations.RunPython(re_slug_all_the_things, migrations.RunPython.noop)
]

View File

@@ -1 +1 @@
__version__ = (1, 0, 0)
__version__ = (1, 0, 1)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 46 KiB