From fda29b207fe3627445319386fd75b8da8860cee6 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 2 Jun 2021 17:58:43 +0200 Subject: fix size of imagefiel ind show and note model diff --git a/program/migrations/0013_show_and_note_images.py b/program/migrations/0013_show_and_note_images.py index 2cf8d1a..91a08b0 100644 --- a/program/migrations/0013_show_and_note_images.py +++ b/program/migrations/0013_show_and_note_images.py @@ -19,11 +19,11 @@ class Migration(migrations.Migration): migrations.AlterField( model_name='show', name='image', - field=models.ImageField(upload_to=program.models.show_image_filename, null=True, verbose_name='Image', blank=True), + field=models.ImageField(max_length=350, upload_to=program.models.show_image_filename, null=True, verbose_name='Image', blank=True), ), migrations.AddField( model_name='note', name='image', - field=models.ImageField(upload_to=program.models.note_image_filename, null=True, verbose_name='Image', blank=True), + field=models.ImageField(max_length=350, upload_to=program.models.note_image_filename, null=True, verbose_name='Image', blank=True), ), ] diff --git a/program/models.py b/program/models.py index 048e51b..ecebda8 100644 --- a/program/models.py +++ b/program/models.py @@ -261,7 +261,7 @@ class Show(models.Model): musicfocus = models.ManyToManyField(MusicFocus, blank=True, related_name='shows', verbose_name=_("Music focus")) name = models.CharField(_("Name"), max_length=255) slug = models.CharField(_("Slug"), max_length=255, unique=True) - image = models.ImageField(_("Image"), blank=True, null=True, upload_to=show_image_filename) + image = models.ImageField(_("Image"), max_length=350, blank=True, null=True, upload_to=show_image_filename) short_description = models.CharField(_("Short description"), max_length=64) description = tinymce_models.HTMLField(_("Description"), blank=True, null=True) email = models.EmailField(_("E-Mail"), blank=True, null=True) @@ -513,7 +513,7 @@ class Note(models.Model): ) timeslot = models.OneToOneField(TimeSlot, verbose_name=_("Time slot")) title = models.CharField(_("Title"), max_length=128) - image = models.ImageField(_("Image"), blank=True, null=True, upload_to=note_image_filename) + image = models.ImageField(_("Image"), max_length=350, blank=True, null=True, upload_to=note_image_filename) content = tinymce_models.HTMLField(_("Content")) status = models.IntegerField(_("Status"), choices=STATUS_CHOICES, default=1) start = models.DateTimeField(editable=False) -- cgit v0.10.2