--
Ticket URL: <https://code.djangoproject.com/ticket/17881>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* has_patch: 0 => 1
Comment:
I'm uploading an untested patch showing the idea.
It'd be nice if `get_raw_id_fields` accepted an optional `obj` argument,
but apparently, this information isn't available in the `formfield_for_*`
methods. This needs more investigation.
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:1>
* needs_docs: 0 => 1
* needs_tests: 0 => 1
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:2>
* cc: kmike84@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:3>
* keywords: => raw_id_fields
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:4>
* keywords: raw_id_fields => raw-id-fields
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:5>
* keywords: raw-id-fields => raw_id_fields
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:6>
Comment (by romgar):
I was wondering the other day why the default Django admin widget for
related fields is a drop-down by default, instead of an autocomplete (as
we can have with `raw_id_field` option), when my Django admin page was
crashing down.
I understand that it's more convenient with a drop-down when you have few
data, but there is a real risk for Django to crash / expose a lot of data
through this feature, and that's not what we are used to with Django.
Usually, default choices in the whole framework are "safe".
@aaugustin, I guess you are not working on it right now, as this ticket is
4 years old.
Do you think it make sense to change this default behaviour, or it has too
many impacts?
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:7>
* cc: romain.garrigues.cs@… (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:8>
Comment (by timgraham):
The ticket for adding a more usable autocomplete widget is #14370. We
might consider changing the default to that widget at some point, but it's
not a decision to make lightly.
Feel free to work on this ticket if you like.
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:9>
Comment (by Fabien Schwob):
Is anyone working on this ticket or can I work on it ?
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:10>
* cc: elonzh (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/17881#comment:11>