Re: Show FK as input instead of drop down in admin

2021-01-31 Thread Derek
Another option if you want to show actual data, but only a portion, is to use an incremental lookup via an app such https://django-autocomplete-light.readthedocs.io/en/master/ - this works in the Admin as well. On Saturday, 30 January 2021 at 20:58:00 UTC+2 Ryan Nowakowski wrote: > On Wed,

Re: Show FK as input instead of drop down in admin

2021-01-30 Thread Ryan Nowakowski
On Wed, Jan 27, 2021 at 05:33:10AM -0800, Kevin Olbrich wrote: > Is it possible to disable fetching of related models for admin pages? > I have a field that links to a table containing more than 1M rows which > django tries to fetch and build the drop down. For my purpose, it is > sufficient if

Re: Show FK as input instead of drop down in admin

2021-01-27 Thread Mike Dewhirst
On 28/01/2021 3:28 pm, Jim Illback wrote: I think Kevin’s issue is that it takes a huge amount of runtime to create the FK’s select HTML tag - Django having to go through 1M rows before displaying the page. This issue is true in UpdateView CBVs as well. Changing the situation slightly - I’m

Re: Show FK as input instead of drop down in admin

2021-01-27 Thread Jim Illback
I think Kevin’s issue is that it takes a huge amount of runtime to create the FK’s select HTML tag - Django having to go through 1M rows before displaying the page. This issue is true in UpdateView CBVs as well. Changing the situation slightly - I’m talking about just primary keys from here

Re: Show FK as input instead of drop down in admin

2021-01-27 Thread Mike Dewhirst
On 28/01/2021 12:33 am, Kevin Olbrich wrote: Hi! Is it possible to disable fetching of related models for admin pages? I have a field that links to a table containing more than 1M rows which django tries to fetch and build the drop down. For my purpose, it is sufficient if it is a simple

Show FK as input instead of drop down in admin

2021-01-27 Thread Kevin Olbrich
Hi! Is it possible to disable fetching of related models for admin pages? I have a field that links to a table containing more than 1M rows which django tries to fetch and build the drop down. For my purpose, it is sufficient if it is a simple input containing the id instead. How can I