[Django]-Django: Form save override

7👍

you’re not passing the request object to instance.save()

👤manji

2👍

I think because you are doing 2 wrong things,

1- You expect to have request on the model save method

2- You’re doing the (more or less) same things in two different save methods (form and model).

Now you’re doing something in the form save and then overriding that in the model save method.

My general suggestion is to drop with request and model save.

It’s better to do that kind of validation/checking things at form or view level IMHO.

Leave a comment