From 3d49491240010daf77705ca3f185671d8b37b44e Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Fri, 9 Aug 2024 12:03:35 +0200 Subject: [PATCH] chore: Prepare release 3.0.2 (#166) * Update __init__.py * Update CHANGELOG.rst * Update CHANGELOG.rst * Update publish-to-live-pypi.yml * Update publish-to-test-pypi.yml * Update publish-to-live-pypi.yml * Update setup.py * Fix tests * Update tests / migrations for django 4.2 * Fix isort issue --- .github/workflows/codecov.yml | 5 +---- .github/workflows/publish-to-live-pypi.yml | 16 ++++++++------ .github/workflows/publish-to-test-pypi.yml | 7 ++++-- CHANGELOG.rst | 22 +++++++++++++++++-- djangocms_bootstrap4/__init__.py | 2 +- .../migrations/0001_initial.py | 2 +- .../migrations/0001_initial.py | 2 +- .../migrations/0001_initial.py | 4 ++-- .../migrations/0001_initial.py | 4 ++-- .../migrations/0001_initial.py | 6 ++--- .../migrations/0001_initial.py | 4 ++-- .../migrations/0002_added_figure.py | 2 +- .../migrations/0001_initial.py | 6 ++--- .../contrib/bootstrap4_grid/models.py | 15 +++---------- .../migrations/0001_initial.py | 2 +- .../migrations/0001_initial.py | 2 +- .../migrations/0001_initial.py | 4 ++-- .../migrations/0001_initial.py | 4 ++-- .../migrations/0001_initial.py | 2 +- .../migrations/0001_initial.py | 4 ++-- .../migrations/0001_initial.py | 2 +- setup.py | 8 +++---- tests/requirements/dj22_cms37.txt | 4 ---- tests/requirements/dj22_cms38.txt | 4 ---- tests/requirements/dj22_cms39.txt | 4 ---- tests/requirements/dj32_cms39.txt | 4 ---- tests/requirements/dj42_cms311.txt | 4 ++++ 27 files changed, 72 insertions(+), 73 deletions(-) delete mode 100644 tests/requirements/dj22_cms37.txt delete mode 100644 tests/requirements/dj22_cms38.txt delete mode 100644 tests/requirements/dj22_cms39.txt delete mode 100644 tests/requirements/dj32_cms39.txt create mode 100644 tests/requirements/dj42_cms311.txt diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index ce18a2a..ba331a7 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -14,12 +14,9 @@ jobs: matrix: python-version: [ 3.8, 3.9, "3.10"] requirements-file: [ - dj22_cms37.txt, - dj22_cms38.txt, - dj22_cms39.txt, - dj32_cms39.txt, dj32_cms310.txt, dj32_cms311.txt, + dj42_cms311.txt, ] os: [ ubuntu-20.04, diff --git a/.github/workflows/publish-to-live-pypi.yml b/.github/workflows/publish-to-live-pypi.yml index 184f5e1..70b93c8 100644 --- a/.github/workflows/publish-to-live-pypi.yml +++ b/.github/workflows/publish-to-live-pypi.yml @@ -9,12 +9,17 @@ jobs: build-n-publish: name: Build and publish Python 🐍 distributions 📦 to pypi runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/djangocms-bootstrap4 + permissions: + id-token: write steps: - - uses: actions/checkout@master - - name: Set up Python 3.9 - uses: actions/setup-python@v1 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 with: - python-version: 3.9 + python-version: 3.12 - name: Install pypa/build run: >- @@ -34,6 +39,3 @@ jobs: - name: PyPI - Publish distribution 📦 if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 4d77248..d7dbce7 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -9,6 +9,11 @@ jobs: build-n-publish: name: TestPyPI - Build and publish Python 🐍 distributions 📦 runs-on: ubuntu-latest + environment: + name: test + url: https://test.pypi.org/p/djangocms-bootstrap4 + permissions: + id-token: write steps: - uses: actions/checkout@master - name: Set up Python 3.9 @@ -34,7 +39,5 @@ jobs: - name: Publish distribution 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} repository_url: https://test.pypi.org/legacy/ skip_existing: true diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e7ffbd4..0f7f424 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,8 +2,26 @@ Changelog ========= -unreleased -========== +3.0.2 2024-07-24 +================ + +* fix: container replace gettext_lazy with gettext by @florianRepenn in https://github.com/django-cms/djangocms-bootstrap4/pull/164 + +**New Contributors** + +* @florianRepenn made their first contribution in https://github.com/django-cms/djangocms-bootstrap4/pull/164 + +3.0.1 2024-03-02 +================ + +* fix: django import error by @src-r-r in https://github.com/django-cms/djangocms-bootstrap4/pull/162 +* ci: Bump wheel from 0.37.1 to 0.38.1 by @dependabot in https://github.com/django-cms/djangocms-bootstrap4/pull/160 + +**New Contributors** + +* @src-r-r made their first contribution in https://github.com/django-cms/djangocms-bootstrap4/pull/162 + + 3.0.0 2022-09-01 ================ diff --git a/djangocms_bootstrap4/__init__.py b/djangocms_bootstrap4/__init__.py index b7a5531..da4039b 100644 --- a/djangocms_bootstrap4/__init__.py +++ b/djangocms_bootstrap4/__init__.py @@ -1 +1 @@ -__version__ = '3.0.1' +__version__ = '3.0.2' diff --git a/djangocms_bootstrap4/contrib/bootstrap4_alerts/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_alerts/migrations/0001_initial.py index 5cd5b01..2571f46 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_alerts/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_alerts/migrations/0001_initial.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Alerts', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_alerts_bootstrap4alerts', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('alert_context', models.CharField(choices=COLOR_STYLE_CHOICES, default=COLOR_STYLE_CHOICES[0][0], max_length=255, verbose_name='Context')), ('alert_dismissable', models.BooleanField(default=False, help_text='Allows the alert to be closed.', verbose_name='Dismissable')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_badge/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_badge/migrations/0001_initial.py index 4959593..bac5b39 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_badge/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_badge/migrations/0001_initial.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Badge', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_badge_bootstrap4badge', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('badge_text', models.CharField(max_length=255, verbose_name='Badge text')), ('badge_context', models.CharField(choices=COLOR_STYLE_CHOICES, default=COLOR_STYLE_CHOICES[0][0], max_length=255, verbose_name='Context')), ('badge_pills', models.BooleanField(default=False, help_text='Activates the pills style.', verbose_name='Pills style')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_card/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_card/migrations/0001_initial.py index 5e08bb9..ba9bb0b 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_card/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_card/migrations/0001_initial.py @@ -21,7 +21,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Card', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_card_bootstrap4card', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('card_type', models.CharField(choices=CARD_TYPE_CHOICES, default=CARD_TYPE_CHOICES[0][0], max_length=255, verbose_name='Card type')), ('card_context', models.CharField(blank=True, choices=CARD_COLOR_STYLE_CHOICES, max_length=255, verbose_name='Background context')), ('card_alignment', models.CharField(blank=True, choices=CARD_ALIGNMENT_CHOICES, max_length=255, verbose_name='Alignment')), @@ -38,7 +38,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4CardInner', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_card_bootstrap4cardinner', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('inner_type', models.CharField(choices=CARD_INNER_TYPE_CHOICES, default=CARD_INNER_TYPE_CHOICES[0][0], help_text='Define the structure of the plugin.', max_length=255, verbose_name='Inner type')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_carousel/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_carousel/migrations/0001_initial.py index 7a65ec9..575943a 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_carousel/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_carousel/migrations/0001_initial.py @@ -27,7 +27,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Carousel', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_carousel_bootstrap4carousel', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('carousel_style', models.CharField(choices=CAROUSEL_TEMPLATE_CHOICES, default=CAROUSEL_TEMPLATE_CHOICES[0][0], help_text='This is the template that will be used for the component.', max_length=255, verbose_name='Template')), ('carousel_interval', models.IntegerField(default=5000, help_text='The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.', verbose_name='Interval')), ('carousel_controls', models.BooleanField(default=True, help_text='Adding in the previous and next controls.', verbose_name='Controls')), @@ -55,7 +55,7 @@ class Migration(migrations.Migration): ('phone', models.CharField(blank=True, max_length=255, verbose_name='Phone')), ('target', models.CharField(blank=True, choices=TARGET_CHOICES, max_length=255, verbose_name='Target')), ('attributes', djangocms_attributes_field.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), - ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_carousel_bootstrap4carouselslide', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('carousel_content', djangocms_text_ckeditor.fields.HTMLField(blank=True, default='', help_text='Content may also be added using child plugins.', verbose_name='Content')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('carousel_image', filer.fields.image.FilerImageField(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='filer.Image', verbose_name='Slide image')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_collapse/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_collapse/migrations/0001_initial.py index d5bea77..e7d43b3 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_collapse/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_collapse/migrations/0001_initial.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Collapse', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_collapse_bootstrap4collapse', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('siblings', models.CharField(default='.card', help_text='Element to be used to create accordions.', max_length=255, verbose_name='Siblings')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), @@ -31,7 +31,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4CollapseContainer', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_collapse_bootstrap4collapsecontainer', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('identifier', models.SlugField(help_text='Identifier to connect trigger with container.', max_length=255, verbose_name='Unique identifier')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), @@ -44,7 +44,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4CollapseTrigger', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_collapse_bootstrap4collapsetrigger', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('identifier', models.SlugField(help_text='Identifier to connect trigger with container.', max_length=255, verbose_name='Unique identifier')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_content/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_content/migrations/0001_initial.py index 5d0506f..31147ec 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_content/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_content/migrations/0001_initial.py @@ -16,7 +16,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Blockquote', fields=[ - ('cmsplugin_ptr', models.OneToOneField(primary_key=True, to='cms.CMSPlugin', serialize=False, auto_created=True, related_name='bootstrap4_content_bootstrap4blockquote', parent_link=True, on_delete=models.CASCADE)), + ('cmsplugin_ptr', models.OneToOneField(primary_key=True, to='cms.CMSPlugin', serialize=False, auto_created=True, related_name='%(app_label)s_%(class)s', parent_link=True, on_delete=models.CASCADE)), ('quote_content', models.TextField(verbose_name='Quote')), ('quote_origin', models.TextField(verbose_name='Cite', blank=True)), ('quote_alignment', models.CharField(max_length=255, default=ALIGN_CHOICES[0][0], choices=ALIGN_CHOICES, blank=True, verbose_name='Alignment')), @@ -30,7 +30,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Code', fields=[ - ('cmsplugin_ptr', models.OneToOneField(primary_key=True, to='cms.CMSPlugin', serialize=False, auto_created=True, related_name='bootstrap4_content_bootstrap4code', parent_link=True, on_delete=models.CASCADE)), + ('cmsplugin_ptr', models.OneToOneField(primary_key=True, to='cms.CMSPlugin', serialize=False, auto_created=True, related_name='%(app_label)s_%(class)s', parent_link=True, on_delete=models.CASCADE)), ('code_content', models.TextField(verbose_name='Code')), ('tag_type', models.CharField(max_length=255, default=CODE_TYPE_CHOICES[0][0], choices=CODE_TYPE_CHOICES, verbose_name='Code type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(default=dict, verbose_name='Attributes', blank=True)), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_content/migrations/0002_added_figure.py b/djangocms_bootstrap4/contrib/bootstrap4_content/migrations/0002_added_figure.py index 231ac05..9d76c15 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_content/migrations/0002_added_figure.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_content/migrations/0002_added_figure.py @@ -15,7 +15,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Figure', fields=[ - ('cmsplugin_ptr', models.OneToOneField(related_name='bootstrap4_content_bootstrap4figure', primary_key=True, parent_link=True, auto_created=True, to='cms.CMSPlugin', serialize=False, on_delete=models.CASCADE)), + ('cmsplugin_ptr', models.OneToOneField(related_name='%(app_label)s_%(class)s', primary_key=True, parent_link=True, auto_created=True, to='cms.CMSPlugin', serialize=False, on_delete=models.CASCADE)), ('figure_caption', models.CharField(verbose_name='Caption', max_length=255)), ('figure_alignment', models.CharField(verbose_name='Alignment', default=ALIGN_CHOICES[0][0], choices=ALIGN_CHOICES, blank=True, max_length=255)), ('attributes', djangocms_bootstrap4.fields.AttributesField(verbose_name='Attributes', default=dict, blank=True)), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_grid/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_grid/migrations/0001_initial.py index 455396a..5e7361d 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_grid/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_grid/migrations/0001_initial.py @@ -23,7 +23,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4GridColumn', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_grid_bootstrap4gridcolumn', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('column_type', models.CharField(blank=True, choices=GRID_COLUMN_CHOICES, default=GRID_COLUMN_CHOICES[0][0], max_length=255, verbose_name='Column type')), ('column_size', djangocms_bootstrap4.fields.IntegerRangeField(blank=True, help_text='Nummeric value from 1 - 12. Spreads the columns evenly when empty.', null=True, verbose_name='Column size')), ('column_alignment', models.CharField(blank=True, choices=GRID_COLUMN_ALIGNMENT_CHOICES, max_length=255, verbose_name='Alignment')), @@ -58,7 +58,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4GridContainer', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_grid_bootstrap4gridcontainer', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('container_type', models.CharField(choices=GRID_CONTAINER_CHOICES, default=GRID_CONTAINER_CHOICES[0][0], help_text='Defines if the grid should use fixed width (.container) or fluid width (.container-fluid).', max_length=255, verbose_name='Container type')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), @@ -71,7 +71,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4GridRow', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_grid_bootstrap4gridrow', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('vertical_alignment', models.CharField(blank=True, choices=GRID_ROW_VERTICAL_ALIGNMENT_CHOICES, help_text='Read more in the documentation.', max_length=255, verbose_name='Vertical alignment')), ('horizontal_alignment', models.CharField(blank=True, choices=GRID_ROW_HORIZONTAL_ALIGNMENT_CHOICES, help_text='Read more in the documentation.', max_length=255, verbose_name='Horizontal alignment')), ('gutters', models.BooleanField(default=False, help_text='Removes the marginal gutters from the grid.', verbose_name='Remove gutters')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_grid/models.py b/djangocms_bootstrap4/contrib/bootstrap4_grid/models.py index e43955e..d048481 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_grid/models.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_grid/models.py @@ -3,26 +3,17 @@ from django.db import models from django.utils.translation import gettext from django.utils.translation import gettext_lazy as _ - from django.utils.translation import ngettext from cms.models import CMSPlugin from djangocms_bootstrap4.constants import DEVICE_SIZES from djangocms_bootstrap4.fields import AttributesField, IntegerRangeField, TagTypeField -from djangocms_bootstrap4.helpers import ( - get_choices_match, - get_first_choice, - mark_safe_lazy, -) +from djangocms_bootstrap4.helpers import get_choices_match, get_first_choice, mark_safe_lazy from .constants import ( - GRID_COLUMN_ALIGNMENT_CHOICES, - GRID_COLUMN_CHOICES, - GRID_CONTAINER_CHOICES, - GRID_ROW_HORIZONTAL_ALIGNMENT_CHOICES, - GRID_ROW_VERTICAL_ALIGNMENT_CHOICES, - GRID_SIZE, + GRID_COLUMN_ALIGNMENT_CHOICES, GRID_COLUMN_CHOICES, GRID_CONTAINER_CHOICES, GRID_ROW_HORIZONTAL_ALIGNMENT_CHOICES, + GRID_ROW_VERTICAL_ALIGNMENT_CHOICES, GRID_SIZE, ) diff --git a/djangocms_bootstrap4/contrib/bootstrap4_jumbotron/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_jumbotron/migrations/0001_initial.py index 6d9934c..29cebd5 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_jumbotron/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_jumbotron/migrations/0001_initial.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Jumbotron', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_jumbotron_bootstrap4jumbotron', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('fluid', models.BooleanField(default=False, help_text='Adds the .jumbotron-fluid class.', verbose_name='Fluid')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_link/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_link/migrations/0001_initial.py index 2691315..f53e568 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_link/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_link/migrations/0001_initial.py @@ -30,7 +30,7 @@ class Migration(migrations.Migration): ('phone', models.CharField(blank=True, max_length=255, verbose_name='Phone')), ('target', models.CharField(blank=True, choices=TARGET_CHOICES, max_length=255, verbose_name='Target')), ('attributes', djangocms_attributes_field.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), - ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_link_bootstrap4link', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('link_type', models.CharField(choices=LINK_CHOICES, default=LINK_CHOICES[0][0], help_text='Adds either the .btn-* or .text-* classes.', max_length=255, verbose_name='Type')), ('link_context', models.CharField(blank=True, choices=COLOR_STYLE_CHOICES, max_length=255, verbose_name='Context')), ('link_size', models.CharField(blank=True, choices=LINK_SIZE_CHOICES, max_length=255, verbose_name='Size')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_listgroup/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_listgroup/migrations/0001_initial.py index 1bb5a6c..26058a1 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_listgroup/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_listgroup/migrations/0001_initial.py @@ -20,7 +20,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4ListGroup', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_listgroup_bootstrap4listgroup', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('list_group_flush', models.BooleanField(default=False, help_text='Create lists of content in a card with a flush list group.', verbose_name='List group flush')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), @@ -33,7 +33,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4ListGroupItem', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_listgroup_bootstrap4listgroupitem', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('list_context', models.CharField(blank=True, choices=COLOR_STYLE_CHOICES, max_length=255, verbose_name='Context')), ('list_state', models.CharField(blank=True, choices=LISTGROUP_STATE_CHOICES, max_length=255, verbose_name='State')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_media/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_media/migrations/0001_initial.py index 633bb6e..d4d2610 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_media/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_media/migrations/0001_initial.py @@ -18,7 +18,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Media', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_media_bootstrap4media', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), ], @@ -30,7 +30,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4MediaBody', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_media_bootstrap4mediabody', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(choices=TAG_CHOICES, default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.', max_length=255, verbose_name='Tag type')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, default=dict, verbose_name='Attributes')), ], diff --git a/djangocms_bootstrap4/contrib/bootstrap4_picture/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_picture/migrations/0001_initial.py index d9c1581..e7bf37e 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_picture/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_picture/migrations/0001_initial.py @@ -36,7 +36,7 @@ class Migration(migrations.Migration): ('use_no_cropping', models.BooleanField(default=False, help_text='Outputs the raw image without cropping.', verbose_name='Use original image')), ('use_crop', models.BooleanField(default=False, help_text='Crops the image according to the thumbnail settings provided in the template.', verbose_name='Crop image')), ('use_upscale', models.BooleanField(default=False, help_text='Upscales the image to the size of the thumbnail settings in the template.', verbose_name='Upscale image')), - ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_picture_bootstrap4picture', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('picture_fluid', models.BooleanField(default=True, help_text='Adds the .img-fluid class to make the image responsive.', verbose_name='Responsive')), ('picture_rounded', models.BooleanField(default=False, help_text='Adds the .rounded class for round corners.', verbose_name='Rounded')), ('picture_thumbnail', models.BooleanField(default=False, help_text='Adds the .img-thumbnail class.', verbose_name='Thumbnail')), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_tabs/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_tabs/migrations/0001_initial.py index 8f653cc..85defc3 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_tabs/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_tabs/migrations/0001_initial.py @@ -16,7 +16,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Tab', fields=[ - ('cmsplugin_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, to='cms.CMSPlugin', auto_created=True, related_name='bootstrap4_tabs_bootstrap4tab', on_delete=models.CASCADE)), + ('cmsplugin_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, to='cms.CMSPlugin', auto_created=True, related_name='%(app_label)s_%(class)s', on_delete=models.CASCADE)), ('tab_style', models.CharField(max_length=255, choices=TAB_TEMPLATE_CHOICES, verbose_name='Template', default=TAB_TEMPLATE_CHOICES[0][0], help_text='This is the template that will be used for the component.')), ('tab_type', models.CharField(max_length=255, choices=TAB_TYPE_CHOICES, verbose_name='Type', default=TAB_TYPE_CHOICES[0][0])), ('tab_alignment', models.CharField(max_length=255, blank=True, choices=TAB_ALIGNMENT_CHOICES, verbose_name='Alignment')), @@ -33,7 +33,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4TabItem', fields=[ - ('cmsplugin_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, to='cms.CMSPlugin', auto_created=True, related_name='bootstrap4_tabs_bootstrap4tabitem', on_delete=models.CASCADE)), + ('cmsplugin_ptr', models.OneToOneField(parent_link=True, serialize=False, primary_key=True, to='cms.CMSPlugin', auto_created=True, related_name='%(app_label)s_%(class)s', on_delete=models.CASCADE)), ('tab_title', models.CharField(max_length=255, verbose_name='Tab title')), ('tag_type', djangocms_bootstrap4.fields.TagTypeField(max_length=255, choices=TAG_CHOICES, verbose_name='Tag type', default=TAG_CHOICES[0][0], help_text='Select the HTML tag to be used.')), ('attributes', djangocms_bootstrap4.fields.AttributesField(blank=True, verbose_name='Attributes', default=dict)), diff --git a/djangocms_bootstrap4/contrib/bootstrap4_utilities/migrations/0001_initial.py b/djangocms_bootstrap4/contrib/bootstrap4_utilities/migrations/0001_initial.py index 12764d5..dbe3f2f 100644 --- a/djangocms_bootstrap4/contrib/bootstrap4_utilities/migrations/0001_initial.py +++ b/djangocms_bootstrap4/contrib/bootstrap4_utilities/migrations/0001_initial.py @@ -20,7 +20,7 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bootstrap4Spacing', fields=[ - ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='bootstrap4_utilities_bootstrap4spacing', serialize=False, to='cms.CMSPlugin')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.CMSPlugin')), ('space_property', models.CharField(choices=SPACER_PROPERTY_CHOICES, default=SPACER_PROPERTY_CHOICES[0][0], max_length=255, verbose_name='Property')), ('space_sides', models.CharField(blank=True, choices=SPACER_SIDE_CHOICES, default=SPACER_SIDE_CHOICES[0][0], max_length=255, verbose_name='Sides')), ('space_size', models.CharField(choices=SPACER_SIZE_CHOICES, default=SPACER_SIZE_CHOICES[0][0], max_length=255, verbose_name='Size')), diff --git a/setup.py b/setup.py index 32355fc..44c2572 100644 --- a/setup.py +++ b/setup.py @@ -30,12 +30,12 @@ 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', 'Framework :: Django', - 'Framework :: Django :: 2.2', 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.2', 'Framework :: Django CMS', 'Framework :: Django CMS :: 3.7', 'Framework :: Django CMS :: 3.8', diff --git a/tests/requirements/dj22_cms37.txt b/tests/requirements/dj22_cms37.txt deleted file mode 100644 index 6b96a10..0000000 --- a/tests/requirements/dj22_cms37.txt +++ /dev/null @@ -1,4 +0,0 @@ --r base.txt - -Django>=2.2,<3.0 -django-cms>=3.7,<3.8 diff --git a/tests/requirements/dj22_cms38.txt b/tests/requirements/dj22_cms38.txt deleted file mode 100644 index 22c4fef..0000000 --- a/tests/requirements/dj22_cms38.txt +++ /dev/null @@ -1,4 +0,0 @@ --r base.txt - -Django>=2.2,<3.0 -django-cms>=3.8,<3.9 diff --git a/tests/requirements/dj22_cms39.txt b/tests/requirements/dj22_cms39.txt deleted file mode 100644 index 0626f35..0000000 --- a/tests/requirements/dj22_cms39.txt +++ /dev/null @@ -1,4 +0,0 @@ --r base.txt - -Django>=2.2,<3.0 -django-cms>=3.9,<3.10 diff --git a/tests/requirements/dj32_cms39.txt b/tests/requirements/dj32_cms39.txt deleted file mode 100644 index e5b970a..0000000 --- a/tests/requirements/dj32_cms39.txt +++ /dev/null @@ -1,4 +0,0 @@ --r base.txt - -Django>=3.2,<4.0 -django-cms>=3.9,<3.10 diff --git a/tests/requirements/dj42_cms311.txt b/tests/requirements/dj42_cms311.txt new file mode 100644 index 0000000..23f2164 --- /dev/null +++ b/tests/requirements/dj42_cms311.txt @@ -0,0 +1,4 @@ +-r base.txt + +Django>=4.2,<5.0 +django-cms>=3.11,<4.0