#25396: ModelAdmin.get_queryset doesn't accept ValueQuerySet
-------------------------------+--------------------------------------
Reporter: dex4er | 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 charettes):
I understand your use case but I'm not sure simply allowing
`get_queryset()` to return a `ValueQuerySet` will do here.
From what I understand this will break many things since your results omit
the `pk` from the results. Your provided examples are good example of
customization required to make this work (e.g `list_display` mapping to
methods, `has_add_permission` returning `False`) and silence strange
errors the admin code might be raising.
I'm still not convinced we should accept this new feature, even with a
defined use case.
--
Ticket URL: <https://code.djangoproject.com/ticket/25396#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/064.9bb7d378d4351cd81f879733a4ff5b3b%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.