From b79cd1c5315a9707af22377bc3a2851c61ce7076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Thu, 2 Apr 2020 19:04:38 +0200 Subject: [PATCH] add max length to document description --- .../pile/migrations/0009_auto_20200402_1904.py | 18 ++++++++++++++++++ sdbs_pile/pile/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 sdbs_pile/pile/migrations/0009_auto_20200402_1904.py diff --git a/sdbs_pile/pile/migrations/0009_auto_20200402_1904.py b/sdbs_pile/pile/migrations/0009_auto_20200402_1904.py new file mode 100644 index 0000000..2fbc6a8 --- /dev/null +++ b/sdbs_pile/pile/migrations/0009_auto_20200402_1904.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.4 on 2020-04-02 17:04 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pile', '0008_localize_files_20200401_1221'), + ] + + operations = [ + migrations.AlterField( + model_name='document', + name='description', + field=models.TextField(blank=True, max_length=2048), + ), + ] diff --git a/sdbs_pile/pile/models.py b/sdbs_pile/pile/models.py index 742e1c3..c18b2b4 100644 --- a/sdbs_pile/pile/models.py +++ b/sdbs_pile/pile/models.py @@ -44,7 +44,7 @@ class Document(SoftDeletableModel): title = models.CharField(max_length=512, null=False, blank=False) author = models.CharField(max_length=512, null=False, blank=True) published = models.CharField(max_length=128, null=False, blank=True) - description = models.TextField(null=False, blank=True) + description = models.TextField(max_length=2048, null=False, blank=True) external_url = models.URLField(null=True, blank=True) file = models.FileField(null=True, blank=True, storage=FileSystemStorage(location='docs')) public = models.BooleanField(default=True, null=False, blank=False)