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
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
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=
3 matches
Mail list logo