#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 carljm):
Replying to [comment:4 lukeplant]: > I have attached a patch which fixes the issue, for another pair of eyes to review. For the reason given above, I have implemented it so that only the exact lookup specified in the limit_choices_to is allowed. The only problem is that this involves passing the value to the `ModelAdmin.lookup_allowed` method, thus changing its signature. Due to the breakage in 1.2.4, people are already using the lookup_allowed method (e.g. http://www.hoboes.com/Mimsy/hacks/fixing-django-124s- suspiciousoperation-filtering/ ), so we need to think what to do about that. I realize people are overriding this method because 1.2.4 already broke their code once, but nonetheless: if we can't change the signature of undocumented internal methods, we're really up a creek fixing anything in a sane way. Seems reasonable to me to go ahead and make this fix with a warning in the release notes for 1.2.5. Overall, fix looks reasonable to me. -- Ticket URL: <http://code.djangoproject.com/ticket/15103#comment:5> 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 django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.