Custom generic managers
An enhancement of the QuerySet which sets the objects language before they are returned.
When using this class in combination with django-polymorphic, make sure this class is first in the chain of inherited classes.
Initialize self. See help(type(self)) for accurate signature.
Only return objects which are translated, or have a fallback that should be displayed.
Typically that’s the currently active language and fallback language. This should be combined with
hide_untranslated = True, only the currently active language will be returned.
Create a new object with the given kwargs, saving it to the database and returning the created object.
Set the language code to assign to objects retrieved using this QuerySet.
Only return translated objects which of the given languages.
When no language codes are given, only the currently active language is returned.
Due to Django ORM limitations, this method can’t be combined with other filters that access the translated fields. As such, query the fields in one filter:
qs.translated('en', name="Cheese Omelette")
This will query the translated model for the