Jan Pieter Waagmeester

Results 85 comments of Jan Pieter Waagmeester

For example: Doing `.order_by('title_i18n').distict('title_i18n')` doesn't work, because distinct arguments are not rewritten. Possible workaround is ``` .annotate(title_order=models.functions.Cast('title_i18n', output_field=models.CharField(255))) .order_by('title_order') .distinct('title_order') ``` but it's better to avoid it.

Test case: English works, but dutch fails with: `ProgrammingError: SELECT DISTINCT ON expressions must match initial ORDER BY expressions.` ``` with override('en'): qs = Blog.objects.filter(category__name_i18n='Birds').order_by('title_i18n').distinct('title') self.assertEqual(key(qs, 'title_i18n', sep=' '), 'Falcon...

@pjburon thanks for the extra info, I'll have a look next week.

You don't mention what you expect to see. The docs have an [admin support](http://django-modeltrans.readthedocs.io/en/latest/pages/admin.html) page, mentioning the `ActiveLanguageMixin`. It make sure only the default language and the current language are...

I see. Interesting use case. But do you want to show all languages to the user always?