Django-parler

Latest version: v2.3

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

Scan your dependencies

Page 3 of 4

1.6.5

-----------------------------

* Fix ``get_translated_url()`` when Django uses bytestrings for ``QUERY_STRING``.
* Raise ``ValidError`` when a ``TranslatableForm`` is initialized with a language code
that is not available in ``LANGUAGES``.

**Backwards compatibility note:** An ``ValueError`` is now raised when forms are initialized
with an invalid languae code. If your project relied on invalid language settings, make sure
that ``LANGAUGE_CODE`` and ``LANGUAGES`` are properly configured.

Rationale: Since the security fix in v1.6.3 (to call the ``clean()`` method of translated fields),
invalid language codes are no longer accepted. The choice was either to passively warn and exclude
the language from validation checks, or to raise an error beforehand that the form is used
to initialize bad data. It's considered more important to avoid polluted database contents
then preserving compatibility, hence this check remains as strict.

1.6.4

-----------------------------

* Fix calling ``clean()`` on fields that are not part of the form.
* Fix tab appearance for Django 1.9 and flat theme.
* Fix issues with ``__proxy__`` field for template names
* Fix attempting to save invalid ``None`` language when Django translations are not yet initialized.

**Note:** django-parler models now mandate that a language code is selected; either by calling
``model.set_current_language()``, ``Model.objects.language()`` or activating a gettext environment.
The latter always happens in a standard web request, but needs to happen explicitly in management commands.
This avoids hard to debug situations where unwanted model changes happen on implicitly selected languages.

1.6.3

-----------------------------

* **Security notice:** Fixed calling ``clean()`` on the translations model.
* Fixed error with M2M relations to the translated model.
* Fixed ``UnicodeError`` in ``parler_tags``
* Show warning when translations are not initialized (when using management commands).

1.6.2

-----------------------------

* Added ``TranslatableModelMixin`` to handle complex model inheritance issues.
* Fixed tuple/list issues with ``fallbacks`` option.
* Fixed Python 3 `__str__()`` output for ``TranslatedFieldsModel``.
* Fixed output for ``get_language_title()`` when language is not configured.
* Fixed preserving GET args in admin change form view.


Changes in version 1.6.1 (2016-02-11)
-------------------------------------

* Fix queryset ``.dates()`` iteration in newer Django versions.
* Fixed Django 1.10 deprecation warnings in the admin.
* Avoided absolute URLs in language tabs.


Changes in version 1.6 (2015-12-29)
-----------------------------------

* Added Django 1.9 support
* Added support to generate ``PARLER_LANGUAGES`` from Django CMS' ``CMS_LANGUAGES``.
* Improve language variant support, e.g. ``fr-ca`` can fallback to ``fr``, and ``de-ch`` can fallback to ``de``.
* Dropped support for Django 1.4

(also released as 1.6b1 on 2015-12-16)


Changes in version 1.5.1 (2015-10-01)
-------------------------------------

* Fix handling for non-nullable ``ForeignKey`` in forms and admin.
* Fix performance of the admin list when ``all_languages_column`` or ``language_column`` is added to ``list_display`` (N-query issue).
* Fix support for other packages that replace the BoundField class in ``Form.__get_item__`` (namely django-slug-preview_).
* Fix editing languages that exist in the database but are not enabled in project settings.
* Fix DeprecationWarning for Django 1.8 in the admin.


Changes in version 1.5 (2015-06-30)
-----------------------------------

* Added support for multiple fallback languages!
* Added ``translatable-field`` CSS class to the ``<label>`` tags of translatable fields.
* Added ``{{ field.is_translatable }}`` variable.
* Added warning when saving a model without language code set.
As of Django 1.8, ``get_language()`` returns ``None`` if no language is activated.
* Allow ``safe_translation_getter(default=..)`` to be a callable.
* Added ``all_languages_column``, inspired by aldryn-translation-tools_.
* Changed styling of ``language_column``, the items are now links to the language tabs.
* Fix caching support, the default timeout was wrongly imported.
* Fix Django 1.4 support for using ``request.resolver_match``.
* Fix admin delete translation view when using ``prefetch_related('translations')`` by default in the managers ``get_queryset()`` method.
* Fix using prefetched translations in ``has_translation()`` too.
* Return to change view after deleting a translation.


Changes in version 1.4 (2015-04-13)
-----------------------------------

* Added Django 1.8 support
* Fix caching when using redis-cache
* Fix handling ``update_fields`` in ``save()`` (needed for combining parler with django-mptt_ 0.7)
* Fix unwanted migration changes in Django 1.6/South for the internal ``HideChoicesCharField``.
* Fix overriding get_current_language() / get_form_language() in the ``TranslatableModelFormMixin``/``TranslatableCreateView``/``TranslatableUpdateView``.


Changes in version 1.3 (2015-03-13)
-----------------------------------

* Added support for ``MyModel.objects.language(..).create(..)``.
* Detect when translatable fields are assigned too early.
* Fix adding ``choices=LANGUAGES`` to all Django 1.7 migrations.
* Fix missing 404 check in delete-translation view.
* Fix caching for models that have a string value as primary key.
* Fix support for a primary-key value of ``0``.
* Fix ``get_form_class()`` override check for ``TranslatableModelFormMixin`` for Python 3.
* Fix calling manager methods on related objects in Django 1.4/1.5.
* Improve ``{% get_translated_url %}``, using ``request.resolver_match`` value.
* Fix preserving query-string in ``{% get_translated_url %}``, unless an object is explicitly passed.
* Fix supporting removed model fields in ``get_cached_translation()``.


Changes in version 1.2.1 (2014-10-31)
-------------------------------------

* Fixed fetching correct translations when using ``prefetch_related()``.


Changes in version 1.2 (2014-10-30)
-----------------------------------

* Added support for translations on multiple model inheritance levels.
* Added ``TranslatableAdmin.get_translation_objects()`` API.
* Added ``TranslatableModel.create_translation()`` API.
* Added ``TranslatableModel.get_translation()`` API.
* Added ``TranslatableModel.get_available_languages(include_unsaved=True)`` API.
* **NOTE:** the ``TranslationDoesNotExist`` exception inherits from ``ObjectDoesNotExist`` now.
Check your exception handlers when upgrading.


Changes in version 1.1.1 (2014-10-14)
-------------------------------------

* Fix accessing fields using ``safe_translation_getter(any_language=True)``
* Fix "dictionary changed size during iteration" in ``save_translations()`` in Python 3.
* Added ``default_permissions=()`` for translated models in Django 1.7.


Changes in version 1.1 (2014-09-29)
-----------------------------------

* Added Django 1.7 compatibility.
* Added ``SortedRelatedFieldListFilter`` for displaying translated models in the ``list_filter``.
* Added ``parler.widgets`` with ``SortedSelect`` and friends.
* Fix caching translations in Django 1.6.
* Fix checking ``unique_together`` on the translated model.
* Fix access to ``TranslatableModelForm._current_language`` in early ``__init__()`` code.
* Fix ``PARLER_LANGUAGES['default']['fallback']`` being overwritten by ``PARLER_DEFAULT_LANGUAGE_CODE``.
* Optimized prefetch usage, improves loading of translated models.
* **BACKWARDS INCOMPATIBLE:** The arguments of ``get_cached_translated_field()`` have changed ordering, ``field_name`` comes before ``language_code`` now.


Changes in version 1.0 (2014-07-07)
-----------------------------------

1.0b3

~~~~~~~~~~~~~~~~~~

* Added ``TranslatableSlugMixin``, to be used for detail views.
* Fixed translated field names in admin ``list_display``, added ``short_description`` to ``TranslatedFieldDescriptor``
* Fix internal server errors in ``{% get_translated_url %}`` for function-based views with class kwargs
* Improved admin layout for ``save_on_top=True``.

1.0b2

~~~~~~~~~~~~~~~~~~

* Fixed missing app_label in cache key, fixes support for multiple models with the same name.
* Fixed "dictionary changed size during iteration" in ``save_translations()``

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.