Version 1.4.0
Python and Django versions supported:
- Support for Python 3.5 was added.
- Support for Django 1.9 was added.
- Django 1.6 is no longer officially supported.
- Django 1.4 LTS has reached its end of life, and support will be dropped in hvad 1.5.
- So, as a reminder, supported versions for this release are: 1.4 LTS, 1.7, 1.8 LTS, 1.9.
Compatibility Warnings:
- As a result of the annotations fix (see below), applications that worked around
QuerySet.annotate's shortcomings on translation
querysets are likely to break, asannotate()has been fixed. The
workarounds should be simply removed. - Method
FallbackQueryset.use_fallbacks()
is not supported on Django 1.9 and newer (and deprecated on other versions, see
below). Please useTranslationQueryset.fallbacks()instead. - Translated admin no longer shows objects lacking a translation, starting from
Django 1.9. This behavior will be extended to all Django versions in the next release.
Such objects should not happen anyway, and throw a warning when encountered. - Translation model building has been refactored. It is functionally equivalent to its previous
implementation (it passes the exact same test suite), but code depending on the internals
and inner implementation details could break.
Deprecation List:
- Method
FallbackQueryset.use_fallbacks()
is now deprecated on Django 1.6 and newer. The plan is to completely drop
FallbackQuerysetin the near future, and let
TranslationManager.untranslated()
default to returning a plain Django queryset, thus enabling
MyModel.objects.untranslated()to give access to all features a plain
Django queryset supports.
For queries that need fallbacks, theuse_fallbacks()method has long been
superseded byTranslationQueryset.fallbacks(), which is
better tested, uses simpler code yet supports more features.
Please update your queries accordingly:
MyModel.objects.untranslated().use_fallbacks('en', 'ja', 'fr')should be
rewritten asMyModel.objects.language('en').fallbacks('ja', 'fr'), or even
MyModel.objects.language().fallbacks()to have the query use your application's
language settings automatically.
Fixes:
- Annotations added to a
TranslationQuerysetusing the
QuerySet.annotatemethod no longer end up on
the translation cache with amaster__prefix. - Specifying translation fields in
unique_togetheron translatable models
no longer causes Django to generate incorrect migrations. — #260. - When no
Metaoptions are set on aTranslatableModelForm,
the auto-created one now correctly inherits that of its first base class that
has one set — #262. - Using
language('all')together withvalues()no longer breaks — #264.