From ece7bc554136f11e3cd783f4351d7fb66143a5c1 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 11 Jan 2023 14:51:53 +0100 Subject: [PATCH] gallery: set title max_length to 150 (#73279) --- .../gallery/migrations/0006_enlarge_title.py | 23 +++++++++++++++++++ combo/apps/gallery/models.py | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 combo/apps/gallery/migrations/0006_enlarge_title.py diff --git a/combo/apps/gallery/migrations/0006_enlarge_title.py b/combo/apps/gallery/migrations/0006_enlarge_title.py new file mode 100644 index 00000000..b6b6ec64 --- /dev/null +++ b/combo/apps/gallery/migrations/0006_enlarge_title.py @@ -0,0 +1,23 @@ +# Generated by Django 2.2.26 on 2023-01-11 13:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('gallery', '0005_display_condition'), + ] + + operations = [ + migrations.AlterField( + model_name='gallerycell', + name='title', + field=models.CharField(blank=True, max_length=150, null=True, verbose_name='Title'), + ), + migrations.AlterField( + model_name='image', + name='title', + field=models.CharField(blank=True, max_length=150, verbose_name='Title'), + ), + ] diff --git a/combo/apps/gallery/models.py b/combo/apps/gallery/models.py index 389aa2b2..c5d74c53 100644 --- a/combo/apps/gallery/models.py +++ b/combo/apps/gallery/models.py @@ -27,7 +27,7 @@ from combo.data.models import CellBase @register_cell_class class GalleryCell(CellBase): - title = models.CharField(_('Title'), max_length=50, blank=True, null=True) + title = models.CharField(_('Title'), max_length=150, blank=True, null=True) default_template_name = 'combo/gallerycell.html' manager_form_template = 'combo/gallery_manager.html' @@ -58,7 +58,7 @@ class Image(models.Model): gallery = models.ForeignKey(GalleryCell, on_delete=models.CASCADE, verbose_name=_('Gallery')) image = models.ImageField(_('Image'), upload_to='uploads/gallery/%Y/%m/') order = models.PositiveIntegerField() - title = models.CharField(_('Title'), max_length=50, blank=True) + title = models.CharField(_('Title'), max_length=150, blank=True) class Meta: ordering = ['order']