Re: newforms ModelChoiceField queryset

2007-11-06 Thread Gonzalo Delgado
El Tue, 06 Nov 2007 10:28:39 -0800 Chris Brand <[EMAIL PROTECTED]> escribió: > > Gonzalo Delgado wrote: > > > > The question is: why doesn't something like this work: > > > > ticketform.fields['server'].queryset = > > Server.objects.filter(users=request.user) > > ? > > It doesn't end up on

Re: newforms ModelChoiceField queryset

2007-11-06 Thread Chris Brand
Gonzalo Delgado wrote: > > The question is: why doesn't something like this work: > > ticketform.fields['server'].queryset = > Server.objects.filter(users=request.user) > ? > It doesn't end up on any error, but the rendered form doesn't filter out the > server choices.. any clue? > >

newforms ModelChoiceField queryset

2007-11-06 Thread Gonzalo Delgado
Hello there, I'm using Django 0.96 here. I've got a couple of models related by a ForeignKey that look more or less like this: class Server(models.model): name = models.CharField(maxlength=20) users = models.ManyToManyField(User) class Ticket(models.model): des