+ nobj = objects
+ for key, fltr in filters.items():
+ if key != 'language':
+ nobj = nobj.filter(fltr)
+ self.languages = nobj.order_by('language').values_list(
+ 'language', flat=True).distinct()
+ lang_names = dict(settings.LANGUAGES)
+ self.languages = [
+ (lang, lang_names.get(LANGUAGES_3TO2.get(lang, lang), lang))
+ for lang in self.languages]