Skip to content

Version 0.4.0

Choose a tag to compare

@spectras spectras released this 18 May 14:29
· 5 commits to releases/0.4.x since this release
0.4.0

New Python and Django versions supported:

  • django-hvad now supports Django 1.7 running on Python 2.7, 3.3 and 3.4.
  • django-hvad now supports Django 1.6 running on Python 2.7 and 3.3.

New features:

  • TranslationManager's queryset class can now be overriden by setting its queryset_class attribute.
  • Proxy models can be used with django-hvad. This is a new feature, please use with caution and report any issue on github.
  • TranslatableAdmin's list display now has direct links to each available translation.
  • Instance's translated fields are now available to the model's save() method when saving a TranslatableModelForm.
  • Accessing a translated field on an untranslated instance will now raise an AttributeError with a helpful message instead of letting the error bubble up from the ORM.
  • Method in_bulk is now available on TranslationManager.

Removal of the old nani aliases was postponed until next release.

Deprecation list:

  • Catching ObjectDoesNotExist when accessing a translated field on an instance is deprecated. In case no translation is loaded and none exists in database for current language, an AttributeError is raised instead. For the transition, both are supported until next release.

Fixes:

  • Fixed an issue where TranslatableModelAdmin could overwrite the wrong language while saving a form.
  • No more deprecation warnings when importing only from hvad.
  • TranslatableAdmin now generates relative URLs instead of absolute ones, enabling it to work behind reverse proxies.
  • django-hvad does not depend on the default manager being named objects anymore.
  • Q objects now work properly with TranslationQueryset.
  • lazy_translation_getter now tries translations in settings.LANGUAGES order once it has failed with current language and site's main LANGUAGE_CODE.