#25114: A way to change default raw_id_fields behavior
-------------------------------------+-------------------------------------
     Reporter:  vepkenez             |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  contrib.admin        |                  Version:  1.8
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:                       |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Old description:

> Foreign key fields in the admin currently default to a behavior that can
> cause crashes and user inconvenience.
>
> The default behavior is to render a <select> element containing ''every''
> instance of the model referred to by the FK.
>
> When this field refers to a model that has for example, 100,000 or more
> entries, this can have the affect of crashing a server, a browser, or at
> best making new users confused about why they cannot view the admin page
> for this instance.
>
> Defaulting to raw_id is safer and more reliable in most cases and
> presents minimal compromises in usability (in my opinion).

New description:

 Foreign key fields in the admin currently default to a behavior that can
 cause crashes and user inconvenience.

 The default behavior is to render a <select> element containing ''every''
 instance of the model referred to by the FK.

 When this field refers to a model that has for example, 100,000 or more
 entries, this can have the affect of crashing a server, a browser, or at
 best making new users confused about why they cannot view the admin page
 for this instance.

 A get_raw_id_fields method that enables

--

Comment (by vepkenez):

 You are totally right about this.  I was just here to propose an alternate
 solution to this but I will start a discussion on the dev mailing list.

 something like this...
 {{{
 def get_raw_id_fields(self):
         """
         Hook for overriding default raw_id_fields behavior
         """
         return self.raw_id_fields
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25114#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.344ffedacc69fed731f41c2d4573b8a7%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to