From 04bfe27b0bdb2107c748161aa34a371d79080caf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Sitko?= Date: Fri, 4 Nov 2022 10:49:43 +0100 Subject: [PATCH] update attachment's max_length (#38) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Sitko --- README.rst | 4 +++ .../migrations/0012_auto_20221103_1506.py | 31 +++++++++++++++++++ emailtemplates/models.py | 2 +- setup.py | 2 +- 4 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 emailtemplates/migrations/0012_auto_20221103_1506.py diff --git a/README.rst b/README.rst index a1eba85..4c3f373 100644 --- a/README.rst +++ b/README.rst @@ -16,6 +16,10 @@ Assumptions Changelog ========= +1.1.16 +------ +* change max_length from 100 to 255 in email attachments - https://github.com/deployed/django-emailtemplates/pull/38 + 1.1.15 ------ * ordering in email template & default subject from registry - https://github.com/deployed/django-emailtemplates/pull/37 diff --git a/emailtemplates/migrations/0012_auto_20221103_1506.py b/emailtemplates/migrations/0012_auto_20221103_1506.py new file mode 100644 index 0000000..ec34221 --- /dev/null +++ b/emailtemplates/migrations/0012_auto_20221103_1506.py @@ -0,0 +1,31 @@ +# Generated by Django 3.1.13 on 2022-11-03 14:06 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("emailtemplates", "0011_auto_20221026_0953"), + ] + + operations = [ + migrations.AlterField( + model_name="emailattachment", + name="attachment_file", + field=models.FileField( + max_length=255, + upload_to="emails/attachments/", + verbose_name="Attachment file", + ), + ), + migrations.AlterField( + model_name="massemailattachment", + name="attachment_file", + field=models.FileField( + max_length=255, + upload_to="emails/attachments/", + verbose_name="Attachment file", + ), + ), + ] diff --git a/emailtemplates/models.py b/emailtemplates/models.py index ed315a5..42302db 100644 --- a/emailtemplates/models.py +++ b/emailtemplates/models.py @@ -87,7 +87,7 @@ class BaseEmailAttachment(models.Model): ) name = models.CharField(_("name"), blank=True, max_length=50) attachment_file = models.FileField( - _("Attachment file"), upload_to="emails/attachments/" + _("Attachment file"), upload_to="emails/attachments/", max_length=255 ) comment = models.TextField( verbose_name=_("Comment"), blank=True, help_text=_("visible only in admin") diff --git a/setup.py b/setup.py index 22f2c23..b660422 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( name='django-emailtemplates', - version='1.1.15', + version='1.1.16', packages=find_packages(), package_data={'emailtemplates': ['locale/*/LC_MESSAGES/*.po', 'locale/*/LC_MESSAGES/*.mo']}, include_package_data=True,