Ben Finney <ben+pyt...@benfinney.id.au> wrote:
> Howdy all,
>
> How can I specify which database (by its alias name) a Django ModelForm
> should use
<snip>
> 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 it on the save method (using the same
"using='foo'") paremeter.  Do your work between calling save with
commit=false and doing the real save.

    For example:

http://stackoverflow.com/questions/37740848/use-a-specific-database-with-a-modelform

  
Phil
-- 
AH#61  Wolf#14  BS#89  bus#1  CCB#1  SENS  KOTC#4       ph...@philb.ca
http://philb.ca         EKIII rides with me:  http://eddiekieger.com
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to