add max length to document description

This commit is contained in:
Tomáš Mládek 2020-04-02 19:04:38 +02:00
parent b7b4f7f92c
commit b79cd1c531
2 changed files with 19 additions and 1 deletions

View file

@ -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),
),
]

View file

@ -44,7 +44,7 @@ class Document(SoftDeletableModel):
title = models.CharField(max_length=512, null=False, blank=False) title = models.CharField(max_length=512, null=False, blank=False)
author = models.CharField(max_length=512, null=False, blank=True) author = models.CharField(max_length=512, null=False, blank=True)
published = models.CharField(max_length=128, 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) external_url = models.URLField(null=True, blank=True)
file = models.FileField(null=True, blank=True, storage=FileSystemStorage(location='docs')) file = models.FileField(null=True, blank=True, storage=FileSystemStorage(location='docs'))
public = models.BooleanField(default=True, null=False, blank=False) public = models.BooleanField(default=True, null=False, blank=False)