Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cms_plugins.py - isort/flake8 check #60

Merged
merged 2 commits into from
May 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions djangocms_column/cms_plugins.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from django.utils.translation import gettext_lazy as _

from cms.models import CMSPlugin
from cms import api

Check failure on line 1 in djangocms_column/cms_plugins.py

View workflow job for this annotation

GitHub Actions / isort

Imports are incorrectly sorted and/or formatted.
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from django.utils.translation import gettext_lazy as _

from .forms import MultiColumnForm
from .models import Column, MultiColumns
Expand All @@ -22,13 +21,12 @@
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
Loading