Skip to content

Commit 306c218

Browse files
authored
Merge branch 'main' into djangocms-frontend/docs-328
2 parents f53de2a + b4575df commit 306c218

File tree

45 files changed

+6046
-4121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+6046
-4121
lines changed

.github/workflows/codecov.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,33 +16,41 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] # latest release minus two
19+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] # latest release minus two
2020
requirements-file: [
2121
dj42_cms311.txt,
2222
dj42_cms41.txt,
2323
dj50_cms41.txt,
2424
dj51_cms41.txt,
2525
dj52_cms50.txt,
26+
dj60_cms50.txt,
2627
]
2728
os: [
2829
ubuntu-latest,
2930
]
3031
exclude:
31-
- python-version: "3.9"
32+
# Python 3.14 only works with Django 5.2+
33+
- python-version: "3.14"
34+
requirements-file: dj42_cms311.txt
35+
- python-version: "3.14"
36+
requirements-file: dj42_cms41.txt
37+
- python-version: "3.14"
3238
requirements-file: dj50_cms41.txt
33-
- python-version: "3.9"
39+
- python-version: "3.14"
3440
requirements-file: dj51_cms41.txt
35-
- python-version: "3.9"
36-
requirements-file: dj52_cms50.txt
41+
# Python 3.10 and 3.11 only supported until Django 5.2
3742
- python-version: "3.10"
38-
requirements-file: dj52_cms50.txt
43+
requirements-file: dj60_cms50.txt
44+
- python-version: "3.11"
45+
requirements-file: dj60_cms50.txt
46+
# Python 3.12 and 3.13 don't support Django 4.2 with CMS 3.11
3947
- python-version: "3.12"
4048
requirements-file: dj42_cms311.txt
4149
- python-version: "3.13"
4250
requirements-file: dj42_cms311.txt
4351

4452
steps:
45-
- uses: actions/checkout@v5
53+
- uses: actions/checkout@v6
4654
with:
4755
fetch-depth: '2'
4856

@@ -53,7 +61,8 @@ jobs:
5361
- name: Install dependencies
5462
run: |
5563
sudo apt install libcairo2-dev pkg-config python3-dev
56-
pip install -U -r tests/requirements/${{ matrix.requirements-file }}
64+
python -m pip install --upgrade pip uv
65+
uv pip install --system -r tests/requirements/${{ matrix.requirements-file }}
5766
- name: Run coverage
5867
run: |
5968
coverage run -m pytest

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v5
41+
uses: actions/checkout@v6
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: build
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616
- name: Set up Python
1717
uses: actions/setup-python@v6
1818
with:
@@ -37,7 +37,7 @@ jobs:
3737
needs: build
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v5
40+
uses: actions/checkout@v6
4141
- name: Set up Python
4242
uses: actions/setup-python@v6
4343
with:

.github/workflows/publish-to-live-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
id-token: write
1717
steps:
18-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
1919
- name: Set up Python 3.12
2020
uses: actions/setup-python@v6
2121
with:

.github/workflows/publish-to-test-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
permissions:
1616
id-token: write
1717
steps:
18-
- uses: actions/checkout@v5
18+
- uses: actions/checkout@v6
1919
- name: Set up Python 3.10
2020
uses: actions/setup-python@v6
2121
with:

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ ci:
99

1010
repos:
1111
- repo: https://github.com/asottile/pyupgrade
12-
rev: v3.20.0
12+
rev: v3.21.0
1313
hooks:
1414
- id: pyupgrade
15-
args: ["--py39-plus"]
15+
args: ["--py310-plus"]
1616

1717
- repo: https://github.com/adamchainz/django-upgrade
18-
rev: "1.29.0"
18+
rev: "1.29.1"
1919
hooks:
2020
- id: django-upgrade
2121
args: [--target-version, "4.2"]
@@ -33,6 +33,6 @@ repos:
3333
- flake8-logging-format
3434

3535
- repo: https://github.com/tox-dev/pyproject-fmt
36-
rev: v2.7.0
36+
rev: v2.11.0
3737
hooks:
3838
- id: pyproject-fmt

djangocms_frontend/component_base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import importlib
2-
import typing
32

43
from django import forms
54
from django.apps import apps
@@ -63,6 +62,7 @@ class CMSFrontendComponent(forms.Form):
6362
"link_fieldset_position",
6463
"require_parent",
6564
"parent_classes",
65+
"allowed_models",
6666
]
6767

6868
@classmethod
@@ -212,11 +212,11 @@ def get_registration(cls) -> tuple[type, type, list[type]]:
212212
)
213213

214214
@classproperty
215-
def _component_meta(cls) -> typing.Optional[type]:
215+
def _component_meta(cls) -> type | None:
216216
return getattr(cls, "Meta", None)
217217

218218
@classmethod
219-
def _generate_fieldset(cls) -> list[tuple[typing.Optional[str], dict]]:
219+
def _generate_fieldset(cls) -> list[tuple[str | None, dict]]:
220220
return [(None, {"fields": cls.declared_fields.keys()})]
221221

222222
def get_short_description(self) -> str:

djangocms_frontend/contrib/collapse/templates/djangocms_frontend/bootstrap5/collapse-container.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<{{ instance.tag_type }}{{ instance.get_attributes }}
33
id="{{ instance.container_identifier }}"
44
role="tabpanel"
5-
data-bs-parent="#{{ parent.uuid }}"
5+
data-bs-parent="#collapse-{{ parent.uuid }}"
66
aria-labelledby="trigger-{{ instance.container_identifier }}">
77
{% for plugin in instance.child_plugin_instances %}
88
{% with forloop as parentloop %}{% render_plugin plugin %}{% endwith %}

djangocms_frontend/contrib/collapse/templates/djangocms_frontend/bootstrap5/collapse.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{% load cms_tags frontend %}
22
<{{ instance.tag_type }}{{ instance.get_attributes }}
3-
id="{{ instance.uuid }}"
3+
id="collapse-{{ instance.uuid }}"
44
data-bs-children="{{ instance.collapse_siblings }}"
55
role="tablist"
66
>

djangocms_frontend/contrib/image/cms_plugins.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,16 @@ class ImagePlugin(
6565
"classes": ("collapse",),
6666
"fields": (
6767
"use_responsive_image",
68-
("width", "height"),
6968
"alignment",
7069
),
7170
},
7271
),
7372
(
74-
_("Cropping"),
73+
_("Sizing"),
7574
{
7675
"classes": ("collapse",),
7776
"fields": (
78-
("use_automatic_scaling", "use_no_cropping"),
77+
("width", "height"),
7978
("use_crop", "use_upscale"),
8079
"thumbnail_options",
8180
),

0 commit comments

Comments
 (0)