Re: Display labels for autocomplete fields

2019-08-11 Thread Janez Kranjc
You don't need one for each field. You need one per model - similar to __str__ On Sunday, August 11, 2019 at 3:54:03 PM UTC+2, 1337 Shadow Hacker wrote: > > > Would it be possible to add a `search_display_fields` on the relevant >> ModelAdmin, alongside `search_fields` to customise the display

Re: Display labels for autocomplete fields

2019-08-08 Thread Janez Kranjc
I have also come across the need for this and would be willing to work on a pull request for this feature. On Wednesday, August 7, 2019 at 3:43:43 AM UTC+2, bjw wrote: > > At present the admin autocomplete docs mention > `ModelAdmin.autocomplete_fields` and > `ModelAdmin.search_fields` which

Re: Ignoring accept_language in localization middleware based on prefixed URL patterns

2019-08-08 Thread Janez Kranjc
sers because the previous > URLs would 302 to new URLs and all POST requests would break. But like I > said - an API is just an example I'm using to illustrate my problem. Could > be any part of an application. > > On Wed, 7 Aug 2019 at 09:20, Janez Kranjc wrote: > >> Nothing pre

Re: Ignoring accept_language in localization middleware based on prefixed URL patterns

2019-08-07 Thread Janez Kranjc
302 to new URLs and all POST requests would break. But like I said - an API is just an example I'm using to illustrate my problem. Could be any part of an application. On Wed, 7 Aug 2019 at 09:20, Janez Kranjc wrote: > Nothing prevents the change to the API endpoint except the fact that us

Re: Ignoring accept_language in localization middleware based on prefixed URL patterns

2019-08-07 Thread Janez Kranjc
>> >> Yes, I think this change makes sense, assuming no unexpected difficulties >> arise in the implementation. >> >> Best regards, >> >> -- >> Aymeric. >> >> >> >> On 6 Aug 2019, at 10:58, Janez Kranjc wrote: >> >

Ignoring accept_language in localization middleware based on prefixed URL patterns

2019-08-06 Thread Janez Kranjc
Hi guys! I’m Janez Kranjc, I’ve been using Django for a bit now - since 1.3 and I’ve recently come across and issue that’s been bothering me in multiple projects that I’m working on. Localization middleware ignores the accept language header if ANY url pattern exists that is i18n prefixed