Queryset API


This is the queryset used by the nani.manager.TranslationManager.

Performance consideration

While most methods on nani.manager.TranslationQueryset querysets run using the same amount of queries as if they were untranslated, they all do slightly more complex queries (one extra join).

The following methods run two queries where standard querysets would run one:

New methods

Methods described here are unique to django-nani and cannot be used on normal querysets.



Sets the language for the queryset to either the language code defined or the currently active language. This method should be used for all queries for which you want to have access to all fields on your model.



Returns a nani.manager.FallbackQueryset instance which by default does not fetch any translations. This is useful if you want a list of Shared Model instances, regardless of whether they’re translated in any language.


No translated fields can be used in any method of the queryset returned my this method. See FallbackQueryset


This method is only available on the manager directly, not on a queryset.



Deletes all Translations Model instances in a queryset, without deleting the Shared Model instances.

Not implemented public queryset methods

The following are methods on a queryset which are public APIs in Django, but are not implemented (yet) in django-nani:

Using any of these methods will raise a NotImplementedError.


This is a queryset returned by untranslated, which can be used both to get the untranslated parts of models only or to use fallbacks. By default, only the untranslated parts of models are retrieved from the database.


You may not use any translated fields in any method on this queryset class.

New Methods



Returns a queryset which will use fallbacks to get the translated part of the instances returned by this queryset. If fallbacks is given as a tuple of language codes, it will try to get the translations in the order specified. Otherwise the order of your LANGUAGES setting will be used.


Using fallbacks will cause a lot of queries! In the worst case 1 + (n * x) with n being the amount of rows being fetched and x the amount of languages given as fallbacks. Only ever use this method when absolutely necessary and on a queryset with as few results as possibel.

Project Versions

Table Of Contents

Previous topic


Next topic


This Page