﻿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
5497	OneToOneField limit_choices_to filters parent set in admin	Peter Baumgartner	nobody	"Setting limit_choices_to on a OneToOneField filters the queryset displayed in admin for the parent field.

Seeing this in current SVN (6304)

Example models:


{{{
from django.db import models

class Place(models.Model):
    name = models.CharField(max_length=50)
    
    class Admin:
        pass
    
    def __unicode__(self):
        return u""%s the place"" % self.name

class Restaurant(models.Model):
    place = models.OneToOneField(Place, limit_choices_to={'name': 'My Place'})
    serves_hot_dogs = models.BooleanField()
    serves_pizza = models.BooleanField()

    class Admin:
        pass

    def __unicode__(self):
        return u""%s the restaurant"" % self.place.name
}}}
"	Bug	closed	contrib.admin	dev	Normal	worksforme	onetoonefield	sgt.hulka@…	Accepted	0	0	0	0	0	0
