Question

I'm using django-crispyforms for the first time.

When I try to add an object using the form that I've created for my model using django-crispyforms I get the following error:

TypeError: 'requestform' object is not callable

In particlar it has a problem with this line in my views.py:

new_request = formtoaddrequest(commit=False)

Any idea what this error message means?

Était-ce utile?

La solution

Well, it means you shouldn't be calling it. Why are you calling it? That seems a strange thing to do. Perhaps you mean formtoaddrequest.save(commit=False)?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top