-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
The target field of the Link model probably should be renamed to link_target, or it cannot be used with the Django CMS' API:
def add_plugin(placeholder, plugin_type, language, position="last-child", target=None, **data):
"""
Adds a plugin to a placeholder and returns it.
:param placeholder: Placeholder to add the plugin to
:type placeholder: :class:`cms.models.placeholdermodel.Placeholder` instance
:param plugin_type: What type of plugin to add
:type plugin_type: str or :class:`cms.plugin_base.CMSPluginBase` sub-class, must be a valid plugin
:param str language: Language code for this plugin, must be in :setting:`django:LANGUAGES`
:param str position: Position to add this plugin to the placeholder. Allowed positions are ``"last-child"``
(default), ``"first-child"``, ``"left"``, ``"right"``.
:param target: Parent plugin. Must be plugin instance
:param data: Data for the plugin type instance
"""
The alternative - renaming the add_plugin target parameter into parent is a breaking change and not desired for the API.
Thanks, @mrbazzan for pointing this out in django-cms/djangocms-transfer#43
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels