#20865: admin raw_id_fields does not call value in limit_choices_to --------------------------------+-------------------- Reporter: CollinAnderson | Owner: nobody Type: Bug | Status: new Component: contrib.admin | Version: master Severity: Normal | Keywords: Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------+-------------------- The docs show that `limit_choices_to` works with callables: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to
However, the raw_id_fields widget does not handle this correctly, and it generates a url like so: `/admin/auth/user/?last_login__lte=%3Cbuilt- in%20method%20today%20of%20type%20object%20at%200xb72cd440%3E` As far as I can tell, this has never worked correctly. I have a simple app that demonstrates the problem: https://github.com/collinanderson/limit_choices_to/commit/8e30de93dea1908ae363b8556e3f89d36b031e79 -- Ticket URL: <https://code.djangoproject.com/ticket/20865> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/057.324f1dbd75af250c19e4edcedec21c02%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.