gallery: set title max_length to 150 (#73279)
gitea-wip/combo/pipeline/pr-main This commit looks good Details

This commit is contained in:
Benjamin Dauvergne 2023-01-11 14:51:53 +01:00
parent 68387fbe3b
commit ece7bc5541
2 changed files with 25 additions and 2 deletions

View File

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

View File

@ -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']