[Django]-'QueryDict' object has no attribute

3👍

You’ve defined the form to accept clan as the first positional arg, but you’re passing request.POST first instead.

It should be:

form = AddUnitForm(clan, request.POST)

Note that it is a very bad idea to mess with the class signature; better to pass the clan as a keyword argument and pop it from **kwargs.

Leave a comment