Skip to content

Commit

Permalink
Update cms_plugins.py - isort/flake8 check (#60)
Browse files Browse the repository at this point in the history
* Update cms_plugins.py - isort/flake8 check

* Update cms_plugins.py

---------

Co-authored-by: Fabian Braun <[email protected]>
  • Loading branch information
aacimov and fsbraun authored May 10, 2024
1 parent b41649d commit 280cdfb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions djangocms_column/cms_plugins.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.utils.translation import gettext_lazy as _

from cms.models import CMSPlugin
from cms import api
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool

Expand All @@ -22,13 +22,12 @@ def save_model(self, request, obj, form, change):
request, obj, form, change
)
for _x in range(int(form.cleaned_data['create'])):
col = Column(
parent=obj,
col = api.add_plugin(
placeholder=obj.placeholder,
plugin_type=ColumnPlugin.__name__,
language=obj.language,
target=obj,
width=form.cleaned_data['create_width'],
position=CMSPlugin.objects.filter(parent=obj).count(),
plugin_type=ColumnPlugin.__name__
)
col.save()
return response
Expand Down

0 comments on commit 280cdfb

Please sign in to comment.