#15103: Django 1.2.4 breaks limit_choices_to for raw_id_fields
-------------------------------------------+--------------------------------
Reporter: natrius | Owner: nobody
Status: new | Milestone: 1.3
Component: django.contrib.admin | Version: 1.2
Resolution: | Keywords: blocker regression
send_mail email
Stage: Accepted | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-------------------------------------------+--------------------------------
Comment (by lukeplant):
For this bug, we need to think about whether the value of the lookup, as
well as the field, needs to be checked. Suppose we have:
{{{
#!python
class Person(models.Model):
status = models.ChoiceField(choices=[('2', 'Expert'), ('1',
'Competent'), ('0', 'Noob')])
class Tour(models.Model):
leader = models.ForeignKey(Person)
class Holiday(models.Model):
tour = models.ForeignKey(Tour, limit_choices_to({'leader__status':
'2'}))
}}}
Now, either with raw_id_fields or without, the user will be able to see a
list of Tours that have an 'expert' leader. But that doesn't necessarily
mean we want them to be able to see which Tours have a 'noob' leader. I
think this means we need be checking the value somewhere.
Also, I'm not convinced we are always parsing the value from the query
string properly - see #14880 - so we may need to look at this carefully.
--
Ticket URL: <http://code.djangoproject.com/ticket/15103#comment:3>
Django <http://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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.