onetoone field in admin

2012-06-04 Thread het.oosten
When i select a onetoone field in admin which has already been taken, I get an error message (already exist). This is of course expected behaviour. The problem i have is that the list to select from gets very long because all items are listed. Is there a way to hide all options that are already

Re: limit)choices_to and OneToOne field affecting admin

2007-06-28 Thread Joe
Found it. In line 745 and 746 in main.py in django/contrib/admin/ views if self.opts.one_to_one_field: qs = qs.complex_filter(self.opts.one_to_one_field.rel.limit_choices_to) What was the thought behind this, and why wouldn't this be optional? On Jun 28, 8:52 am, Joe

limit)choices_to and OneToOne field affecting admin

2007-06-28 Thread Joe
Hi, I have a model that has a OneToOneField to User and a limit_choices_to parameter set: class Profile(models.model): [---tab---] user = models.OneToOneField(User, limit_choices_to={'is_staff':True}) When I use this is_staff parameter, I can only see staff users when I log in to the Django