Skip to content

Commit

Permalink
issue #237
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur committed Dec 1, 2020
1 parent fd38288 commit 8d5a981
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
43 changes: 43 additions & 0 deletions papermerge/core/migrations/0034_auto_20201201_1116.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Generated by Django 3.1.3 on 2020-12-01 11:16

from django.db import migrations, models
import papermerge.core.validators


class Migration(migrations.Migration):

dependencies = [
('core', '0033_auto_20201119_0032'),
]

operations = [
migrations.RemoveField(
model_name='document',
name='file_orig',
),
migrations.AlterField(
model_name='basetreenode',
name='title',
field=models.CharField(max_length=200, validators=[papermerge.core.validators.safe_character_validator], verbose_name='Title'),
),
migrations.AlterField(
model_name='document',
name='file_name',
field=models.CharField(default='', max_length=1024, validators=[papermerge.core.validators.safe_character_validator]),
),
migrations.AlterField(
model_name='document',
name='notes',
field=models.TextField(blank=True, null=True, validators=[papermerge.core.validators.safe_character_validator], verbose_name='Notes'),
),
migrations.AlterField(
model_name='document',
name='text',
field=models.TextField(blank=True),
),
migrations.AlterField(
model_name='tag',
name='name',
field=models.CharField(max_length=100, validators=[papermerge.core.validators.safe_character_validator], verbose_name='name'),
),
]
8 changes: 1 addition & 7 deletions papermerge/core/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ class Document(BaseTreeNode):
class CannotUpload(Exception):
pass

#: reference to original file, usually a pdf document with
#: no post-processing performed on this file.
file_orig = models.FileField(
max_length=512,
help_text="Reference to originaly imported file"
)
#: basename + ext of uploaded file.
#: other path details are deducted from user_id and document_id
file_name = models.CharField(
Expand Down Expand Up @@ -84,7 +78,7 @@ class CannotUpload(Exception):
# A: pdftk on every operation creates a new file... well, that new
# file is the next version of the document.

text = models.TextField()
text = models.TextField(blank=True)

PREVIEW_HEIGHTS = (100, 300, 500)

Expand Down

0 comments on commit 8d5a981

Please sign in to comment.