[Fixed]-Django: form_valid() takes exactly 2 arguments (3 given)

1👍

Like the error says, you’re passing three arguments to form_valid; that’s because you explicitly overrode post to send those three, and modified the signature of form_valid in FormsetMixin to accept them. However in EmergencyLightingCreate you’ve reverted to only accepting two arguments. You need to be consistent about how many arguments your methods accept when you’re subclassing.

Leave a comment