#29688: ModelAdmin: Add attribute to override manager used by
ModelAdmin.get_queryset()
-------------------------------+--------------------------------------
     Reporter:  Jon Dufresne   |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  contrib.admin  |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by Jon Dufresne):

 I appreciate the desire to contain the number of `ModelAdmin`
 configuration options. However, this option is very well contained,
 simple, and solves a real use case for me. I don't think it will add much
 overhead or ongoing maintenance.

 I agree that to override `ModelAdmin.get_queryset()` that I'd be copying
 just a small handful of lines. I still don't think it is a great practice.
 It ignores that the Django ModelAdmin could slowly evolve with features
 while my overridden methods don't not call the parent. You're now
 suggesting that I customize more logic of `ModelAdmin.get_queryset()`, I
 don't consider that an improvement when it could be handled with a
 declarative class attribute.

 > That doesn't convince me that we should be encouraging (or enabling
 even) users down this road.

 What if it remained an undocumented API? That would be enough for me to
 use the feature, but might handle this concern for you.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29688#comment:5>
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/067.2580dc140c4f7c9d65f576640366c9a9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to