#2445: [patch] allow callable values for limit_choices_to
-------------------------------------+-------------------------------------
Reporter: michael@… | Owner: Tim
Type: New feature | Graham <timograham@…>
Component: Core (Other) | Status: closed
Severity: Normal | Version: master
Keywords: sprint2013 | Resolution: fixed
Has patch: 1 | Triage Stage: Accepted
Needs tests: 0 | Needs documentation: 0
Easy pickings: 0 | Patch needs improvement: 0
| UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by blueyed):
Thanks! This looks very useful.
I wonder if it could be changed to pass along any `request` object to the
callback, which would allow to look at `request.user` and then limit the
choices to objects that the current user owns?
From what I understand the `request` object may not be available, e.g.
when used via management commands, where `None` would be passed to the
callback then.
--
Ticket URL: <https://code.djangoproject.com/ticket/2445#comment:61>
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/079.00a8e644605140d03ab6aba6d39ce6a3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.