Skip to content

Commit c2f8da8

Browse files
authored
Merge branch 'django-cms:master' into master
2 parents 1abe124 + fbed89f commit c2f8da8

Some content is hidden

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

63 files changed

+217
-570
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
Changelog
33
=========
44

5+
1.3.2 (2024-04-25)
6+
==================
7+
8+
* fix: make grid layout (rows/columns) compatible with flex box-based Django admin by @fsbraun in https://github.com/django-cms/djangocms-frontend/pull/208
9+
* fix: Improved handling of optional smart link field by @fsbraun in https://github.com/django-cms/djangocms-frontend/pull/210
10+
11+
512
1.3.1 (2024-04-12)
613
==================
714

djangocms_frontend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919
13. Github actions will publish the new package to pypi
2020
"""
2121

22-
__version__ = "1.3.1"
22+
__version__ = "1.3.2"

djangocms_frontend/common/attributes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ class AttributesMixin:
1616

1717
def get_fieldsets(self, request, obj=None):
1818
meta = self.form._meta
19-
fields = (
20-
["tag_type"] if "tag_type" in getattr(meta, "untangled_fields", ()) else []
21-
)
19+
fields = ["tag_type"] if "tag_type" in getattr(meta, "untangled_fields", ()) else []
2220
fields.append("attributes")
2321
return insert_fields(
2422
super().get_fieldsets(request, obj),

djangocms_frontend/common/bootstrap5/background.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ class Meta:
4747
background_context = forms.ChoiceField(
4848
label=_("Background context"),
4949
required=False,
50-
choices=settings.EMPTY_CHOICE
51-
+ settings.COLOR_STYLE_CHOICES
52-
+ (("transparent", _("Transparent")),),
50+
choices=settings.EMPTY_CHOICE + settings.COLOR_STYLE_CHOICES + (("transparent", _("Transparent")),),
5351
initial=settings.EMPTY_CHOICE[0][0],
5452
widget=ColoredButtonGroup(),
5553
)

djangocms_frontend/common/bootstrap5/sizing.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,13 @@ class Meta:
4646
initial=settings.EMPTY_CHOICE[0][0],
4747
choices=settings.EMPTY_CHOICE + settings.SIZE_X_CHOICES,
4848
# widget=ButtonGroup(attrs=dict(property="text")),
49-
help_text=_(
50-
"Sets the horizontal size relative to the surrounding container or the viewport."
51-
),
49+
help_text=_("Sets the horizontal size relative to the surrounding container or the viewport."),
5250
)
5351
size_y = forms.ChoiceField(
5452
label=_("Vertical size"),
5553
required=False,
5654
initial=settings.EMPTY_CHOICE[0][0],
5755
choices=settings.EMPTY_CHOICE + settings.SIZE_Y_CHOICES,
5856
# widget=ButtonGroup(attrs=dict(property="text")),
59-
help_text=_(
60-
"Sets the vertical size relative to the surrounding container or the viewport."
61-
),
57+
help_text=_("Sets the vertical size relative to the surrounding container or the viewport."),
6258
)

djangocms_frontend/common/spacing.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,7 @@ def __init__(self, **kwargs):
2828
self.side_choices = kwargs.pop("side_choices")
2929
super().__init__(
3030
[
31-
IconGroup(
32-
choices=[
33-
(self.property + side, verbose)
34-
for side, verbose in self.side_choices
35-
]
36-
),
31+
IconGroup(choices=[(self.property + side, verbose) for side, verbose in self.side_choices]),
3732
DivSelectWidget(choices=kwargs.pop("size_choices")),
3833
],
3934
**kwargs,

djangocms_frontend/common/title.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ def __init__(self, *args, **kwargs):
3636

3737
def clean(self, value):
3838
if value[0] and not value[1]:
39-
raise ValidationError(
40-
_("Please add a title if you want to publish it."), code="incomplete"
41-
)
39+
raise ValidationError(_("Please add a title if you want to publish it."), code="incomplete")
4240
return super().clean(value)
4341

4442
def compress(self, data_list):

djangocms_frontend/contrib/accordion/frameworks/bootstrap5.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,5 @@ def render(self, context, instance, placeholder):
1515
instance.add_classes("accordion-collapse collapse")
1616
if instance.accordion_item_open:
1717
instance.add_classes("show")
18-
instance.font_size = (
19-
context["parent"]
20-
.config.get("accordion_header_type", "")
21-
.replace("h", "fs-")
22-
)
18+
instance.font_size = context["parent"].config.get("accordion_header_type", "").replace("h", "fs-")
2319
return super().render(context, instance, placeholder)

djangocms_frontend/contrib/alert/cms_plugins.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313

1414

1515
@plugin_pool.register_plugin
16-
class AlertPlugin(
17-
mixin_factory("Alert"), AttributesMixin, ResponsiveMixin, SpacingMixin, CMSUIPlugin
18-
):
16+
class AlertPlugin(mixin_factory("Alert"), AttributesMixin, ResponsiveMixin, SpacingMixin, CMSUIPlugin):
1917
"""
2018
Components > "Alerts" Plugin
2119
https://getbootstrap.com/docs/5.0/components/alerts/

djangocms_frontend/contrib/alert/forms.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@
1818
mixin_factory = settings.get_forms(alert)
1919

2020

21-
class AlertForm(
22-
mixin_factory("Alert"), ResponsiveFormMixin, SpacingFormMixin, EntangledModelForm
23-
):
21+
class AlertForm(mixin_factory("Alert"), ResponsiveFormMixin, SpacingFormMixin, EntangledModelForm):
2422
"""
2523
Components > "Alerts" Plugin
2624
https://getbootstrap.com/docs/5.0/components/alerts/

0 commit comments

Comments
 (0)