Django-content-editor

Latest version: v7.1.0

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

6.1

===================

.. _6.1: https://github.com/matthiask/django-content-editor/compare/6.0...6.1

- **POSSIBLY BACKWARDS INCOMPATIBLE:** Disallowed region keys starting with an
underscore. It was a bad idea to allow these in the first place and caused
some ... unnecessary interactions when wrapping ``Contents`` in lazy objects.
- Fixed an edge case where multiple machine messages were shown.
- Made it possible to move plugins out of unknown regions even if there is only
one valid region at all.

6.0

===================

.. _6.0: https://github.com/matthiask/django-content-editor/compare/5.1...6.0

- Made the ``inherit_from`` argument to ``contents_for_item`` keyword-only.
- Added an optional ``regions`` argument to ``contents_for_items`` and
``contents_for_item`` which allows passing in a list of ``Region`` objects to
limit the regions fetched.
- Renamed the undocumented ``_regions`` attribute of the ``Contents`` object to
``regions``.

5.1

===================

- Added pre-commit.
- Changed the minimum versions to Django 3.2 and Python 3.8.
- Added compatibility with `django-jazzmin
<https://github.com/farridav/django-jazzmin/>`__.

5.0

===================

- Allowed dragging text etc. inside the content editor (made the ``dragstart``
handling only trigger when dragging the title of fieldsets).
- Fixed a bug where overlong fieldset titles would cause wrapping, which made
the region move dropdown and the deletion UI elements inaccessible.
- Made the submit row sticky in content editors.
- Reworked the machine control to always add plugin buttons for all plugins and
removed the plugins dropdown and moved the control to the right hand side of
the editor to improve the visibility of plugin labels.
- Made it possible to drag several content blocks at once.
- Made it possible to directly insert plugins in the middle of the content, not
just at the end.
- Added a bundled copy of `Google's Material Icons library
<https://fonts.google.com/icons>`__ for use in the editor.
- Stopped overflowing the content editor horizontally when using (very) long
descriptions for content blocks.
- Changed the transitions to avoid ugly artefacts when switching regions.
- Stopped merging unknown regions into one tab.
- Fixed one instance of a slightly timing-dependent initialization.
- Added Python 3.10, Django 4.0rc1 to the CI.

4.1

===================

- Fixed the rich text plugin to use the correct selector for the
documented JavaScript code.
- Added ``allow_regions`` and ``deny_regions`` helpers to restrict
plugins to specific regions. This was possible before but may be a
little bit nicer with those helpers.
- Added a workaround for a Chrome regression where the contents of a
collapsed fieldset were still visible. (See `the Chromium bug
<https://bugs.chromium.org/p/chromium/issues/detail?id=1151858>`__.)
- Fixed an edge case where passing a generator to ``contents_for_item``
would cause too many queries because of a missing ``parent`` foreign
key caching.
- Disabled the content editor when there are no regions or when the current
region doesn't allow any plugins.
- Changed the content editor interface to collapse and expand fieldsets with a
single click instead of requiring a totally not discoverable doubleclick.
- Switched to saving the "Collapse all items" state inside the browsers'
localStorage instead of starting with expanded fieldsets every time.
- Changed the JavaScript code to not add history entries anymore when changing
tabs.
- Fixed the layout and sizing of controls in the title of heading blocks (the
dropdown to move the block to a different region and the delete checkbox).
- Changed the content editor to always add new items in an uncollapsed state.
- Added a workaround for Django admin's failure to collapse/uncollapse
fieldsets which have been added dynamically.
- Changed the "Collapse all items" behavior to never collapse fieldsets with
errors inside.
- Changed ``Region`` and ``Template`` to require all of their fields.

4.0

===================

- **BACKWARDS INCOMPATIBLE**: Plugins now use the inline prefix inside
the content editor. ``ContentEditor.addPluginButton()`` now requires
the inline prefix of plugins, not an arbitrary key. E.g. instead of
``<app_label>_<model_name>`` it now expects
``<app_label>_<model_name>_set``. This change allows using the same
plugin model several times with different inlines.
- Allowed configuring plugin buttons by setting the ``button`` attribute
of ``ContentEditorInline`` classes/objects.
- Added highlighting of the current content block in the editor.
- Added focussing of the first input field of new content blocks.
- Added a dragging affordance to content blocks.
- Made hovered and focussed content blocks stand out more.
- Fixed styling problems when using tabbed fieldsets with inlines.
- Fixed a long-standing bug where dropping a content block on top of
e.g. a CKEditor instance wouldn't actually move the dragged block to
the new position.
- Changed the JavaScript code to also handle Ctrl-S, not just Cmd-S to
save; modified the event handler to always save and continue.
- Replaced the collapse-all button with a checkbox to make it clearer
what the state is.
- Allowed collapsing individual content blocks by doubleclicking the
title. This may change in the future (as all things) because it's not
discoverable at all.
- Added a small note when a fieldset is collapsed.
- Changed CSS variables to use the same names as `django-variable-admin
<https://github.com/matthiask/django-variable-admin/>`__.
- Moved the ``Ctrl-S`` and ``Cmd-S`` shortcut handling into its own
``content_editor/save_shortcut.js`` static file to allow easier reuse
in other model admin classes.
- Started modernizing the JavaScript code, dropped Internet Explorer
polyfills. Django dropped support for legacy browsers in the
administration interface in the Django 3.1 release too.
- Changed the JavaScript code to not swallow unrelated drag/drop events.

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.