id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 9561 ForeignKeyRawIdWidget turns string into comma-separated chars in lookup URL andyhd nobody "Using a ForeignKey with limit_choices_to a filter that matches a string: {{{ class Foo(models.Model): bar = models.ForeignKey('Bar', limit_choices_to={'blarch': 'quux'}) # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ class Bar(models.Model): blarch = models.CharField(max_length=20) }}} And a custom admin with raw_id_fields: {{{ class FooAdmin(admin.ModelAdmin): raw_id_fields = ('bar',) }}} results in the changeform magnifying glass lookup link having a URL like this: ""../../../fail/blarch/?'''blarch=q,u,u,x'''"" Fixed by placing the single string value in a list (see patch)" closed contrib.admin 1.0 fixed ForeignKeyRawIdWidget limit_choices_to Unreviewed 1 0 0 0 0 0