From: Radek Czajka Date: Mon, 21 Oct 2024 11:32:14 +0000 (+0200) Subject: Change field length. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/1c013c31745b335962a07057f962e47212faf80f Change field length. --- diff --git a/src/cover/migrations/0007_alter_image_file.py b/src/cover/migrations/0007_alter_image_file.py new file mode 100644 index 00000000..812b9380 --- /dev/null +++ b/src/cover/migrations/0007_alter_image_file.py @@ -0,0 +1,24 @@ +# Generated by Django 4.1.9 on 2024-10-21 13:31 + +import cover.models +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("cover", "0006_image_example"), + ] + + operations = [ + migrations.AlterField( + model_name="image", + name="file", + field=models.ImageField( + max_length=1024, + storage=cover.models.OverwriteStorage(), + upload_to="cover/image", + verbose_name="file", + ), + ), + ] diff --git a/src/cover/models.py b/src/cover/models.py index d7662227..2c452a27 100644 --- a/src/cover/models.py +++ b/src/cover/models.py @@ -33,6 +33,7 @@ class Image(models.Model): download_url = models.URLField(max_length=4096, unique=True, verbose_name=_('image download URL'), null=True, blank=True) file = models.ImageField( upload_to='cover/image', + max_length=1024, storage=OverwriteStorage(), verbose_name=_('file') )