Ben Finney wrote:
>
> The person who wrote that question must think very like myself.
>
> That doesn't address the question about ‘ModelForm.clean’ or
> ‘ModelForm.is_valid’, though; how to tell the instance which database to
> use for those?
I must admit to not using multi-DB myself, but I t
Phil Boutros writes:
> Ben Finney wrote:
> > How can I specify which database (by its alias name) a Django
> > ModelForm should use
>
> > What is the equivalent for using='foo' when instantiating a ModelForm
> > for the model, or calling its methods (ModelForm.clean, ModelForm.save,
> > etc.)?
Ben Finney wrote:
> Howdy all,
>
> How can I specify which database (by its alias name) a Django ModelForm
> should use
> What is the equivalent for using='foo' when instantiating a ModelForm
> for the model, or calling its methods (ModelForm.clean, ModelForm.save,
> etc.)?
You would specify
Howdy all,
How can I specify which database (by its alias name) a Django ModelForm
should use?
(I've had trouble getting this question in to the Django forum, so I'm
trying here as this is still Python-related.)
A Django ModelForm knows its corresponding model, and the fields
included.
The Mode