diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 72567e6..92750ca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,7 @@ Changelog unreleased ========== +* feat: Changed compliance number length to 30 characters 1.4.3 (2022-07-08) ================== diff --git a/djangocms_content_expiry/migrations/0004_alter_contentexpiry_compliance_number.py b/djangocms_content_expiry/migrations/0004_alter_contentexpiry_compliance_number.py new file mode 100644 index 0000000..71e8271 --- /dev/null +++ b/djangocms_content_expiry/migrations/0004_alter_contentexpiry_compliance_number.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.14 on 2022-09-13 04:00 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('djangocms_content_expiry', '0003_contentexpiry_compliance_number'), + ] + + operations = [ + migrations.AlterField( + model_name='contentexpiry', + name='compliance_number', + field=models.CharField(blank=True, max_length=30, null=True), + ), + ] diff --git a/djangocms_content_expiry/models.py b/djangocms_content_expiry/models.py index de6689e..ae5e5fa 100644 --- a/djangocms_content_expiry/models.py +++ b/djangocms_content_expiry/models.py @@ -23,7 +23,7 @@ def _limit_content_type_choices(): class ContentExpiry(models.Model): created = models.DateTimeField(auto_now_add=True) - compliance_number = models.CharField(max_length=15, blank=True, null=True) + compliance_number = models.CharField(max_length=30, blank=True, null=True) created_by = models.ForeignKey( settings.AUTH_USER_MODEL, on_delete=models.PROTECT, diff --git a/djangocms_content_expiry/test_utils/polls/factories.py b/djangocms_content_expiry/test_utils/polls/factories.py index e5e6bbb..10e4437 100644 --- a/djangocms_content_expiry/test_utils/polls/factories.py +++ b/djangocms_content_expiry/test_utils/polls/factories.py @@ -50,7 +50,7 @@ def version(self, create, extracted, **kwargs): @factory.django.mute_signals(pre_version_operation, post_version_operation) class PollContentExpiryFactory(factory.django.DjangoModelFactory): - compliance_number = FuzzyText(length=15) + compliance_number = FuzzyText(length=30) created_by = factory.SubFactory(UserFactory) version = factory.SubFactory(PollVersionFactory) expires = factory.Faker('date_time', tzinfo=timezone.get_current_timezone()) diff --git a/tests/requirements/requirements_base.txt b/tests/requirements/requirements_base.txt index cd7c935..2a143e7 100644 --- a/tests/requirements/requirements_base.txt +++ b/tests/requirements/requirements_base.txt @@ -22,7 +22,7 @@ sphinxcontrib-spelling<7.0.0 # restriction for py35 tests unittest-xml-reporting==1.11.0 # Unreleased django-cms 4.0 compatible packages -https://github.com/django-cms/django-cms/tarball/develop-4#egg=django-cms +https://github.com/django-cms/django-cms/tarball/release/4.0.1.x#egg=django-cms https://github.com/django-cms/djangocms-alias/tarball/master#egg=djangocms-alias https://github.com/django-cms/djangocms-text-ckeditor/tarball/support/4.0.x#egg=djangocms-text-ckeditor https://github.com/django-cms/djangocms-versioning/tarball/master#egg=djangocms-versioning diff --git a/tests/test_admin.py b/tests/test_admin.py index 9ad3e9f..8942aaf 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -113,7 +113,7 @@ def test_change_form_compliance_number_field_is_editable_when_draft_version(self endpoint = self.get_admin_url(ContentExpiry, "change", content_expiry.pk) draft_expected_content = f'' + f'class="vTextField" maxlength="30" id="id_compliance_number">' with self.login_user_context(self.get_superuser()): response = self.client.get(endpoint)