Using Unaccent in Model database function

2020-01-05 Thread Alex Scott
Hi all, I just started using the Unaccent extension for Postgres and implementing queryset filters with it like: q = 'hello' queryset.filter(name__unaccent__istartswith=q) I'm now trying to annotate the queryset result with the search index: queryset.annotate(search_index=StrIndex(Lower('name'

Re: Using Unaccent in Model database function

2020-01-05 Thread Alex Scott
/#unaccent On Sunday, January 5, 2020 at 11:12:45 AM UTC-8, Alex Scott wrote: > > Hi all, > > I just started using the Unaccent extension for Postgres and implementing > queryset filters with it like: > > q = 'hello' > queryset.filter(name__unaccent__istartswith=q)

Re: select_related() and RawQuerySet

2020-04-27 Thread Alex Scott
This is an insanely old thread, but I couldn't find any updates so was curious if anyone had advice on implementing select_related with a RawQuerySet? It seems prefetch_related() works just fine. On Friday, March 2, 2012 at 11:22:52 AM UTC-8, akaariai wrote: > > On Friday, March 2, 2012 7:24:00

Django Admin autocomplete with diacritic support (transliteration / accent support)

2019-07-15 Thread Alex Scott
Hello, I'm using the built-in autocomplete for my admin section which I believe uses the Select2 package. In the documentation of Select2 , it says diacritic-modified letters will be translated into ASCII count