Re: ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 11:25 +0100, Simone Cittadini wrote: > Stripping down my app to what isn't working as expected I have : > > models : > > class Filter(models.Model): > name = models.CharField() > object = models.ManyToManyField(Object) > > class Object(models.Model): > name = m

Re: ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 12:07 +0100, Simone Cittadini wrote: > Malcolm Tredinnick ha scritto: > > On Fri, 2007-11-02 at 11:25 +0100, Simone Cittadini wrote: > >> > >> class FormFilters(forms.Form): > >> filter_name = forms.ChoiceField(choices = [(f.name, f.name) for f in > >> Filter.objects.all

Re: ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Jonathan Buchanan
On 11/2/07, Simone Cittadini <[EMAIL PROTECTED]> wrote: > I think I'm in need of a for dummy example here ... > > in the view code : > > def list_filters(request): > [...] > else: > form = FormFilters() > form.filter_name.choices = [(f.name, f.name) for f in > Filter.object

Re: ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Simone Cittadini
Malcolm Tredinnick ha scritto: > On Fri, 2007-11-02 at 11:25 +0100, Simone Cittadini wrote: >> >> class FormFilters(forms.Form): >> filter_name = forms.ChoiceField(choices = [(f.name, f.name) for f in >> Filter.objects.all()]) >> >> >> One view lists all the objects given the POST of FormFilt

ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Simone Cittadini
Stripping down my app to what isn't working as expected I have : models : class Filter(models.Model): name = models.CharField() object = models.ManyToManyField(Object) class Object(models.Model): name = models.CharField() [...] forms : class FormFilters(forms.Form): filter