Re: Refresh Queryset - I know the answer is there somewhere

2009-01-23 Thread phoebebright
My hero - that worked for time! Many many thanks. On Jan 23, 12:37 pm, Alex Koshelev wrote: > Your query executes in module import time and it happens only one time. So > you cannot reevaluate it using choices field param like that. > > Solution - redefine form `__init__` and manually reassign

Re: Refresh Queryset - I know the answer is there somewhere

2009-01-23 Thread Alex Koshelev
Your query executes in module import time and it happens only one time. So you cannot reevaluate it using choices field param like that. Solution - redefine form `__init__` and manually reassign choices to given field every time form is created. def __init__(self, *args, **kwargs): super(MyFor

Refresh Queryset - I know the answer is there somewhere

2009-01-23 Thread phoebebright
Have been reluctant to post on this one as have come across many many discussion during the 3 days of lack of success on resolving this issue, but none has left me with a solution. I have a form with a dropdown generated from a query. This is in the form: carmake = forms.ChoiceField(choices=