> I am running a unit test.
[...]
> I get the following error.
>
> 265, in __init__
> raise TypeError, "'%s' is an invalid keyword argument for this
> function" % kwargs.keys()[0]
> TypeError: 'title' is an invalid keyword argument for this function
>
>
> I have tried to set title = "SWE" with a double quote as well as
> title='SWE' with a single quote. But nothing seems to be working.
> Can anybody please help?
Try trimming down your model as much as possible by removing columns
apart from title. Then, when the error goes away, reintroduce them
slowly (this will require continually calling "django-admin.py reset
<app_name>", but it's just for debugging this case).
There are a bunch of syntax errors (missing trailing commas) in the
model code you posted, so that's not the code you are really running.
There's also so much of it that it's difficult to work out what the
relevant bits are. So, again, trimming down to the smallest possible
example that fails will no doubt help us and you see where the problem
is a lot more easily. It looks on the surface like your code should work
fine, so it's going to be something like a syntax error or a missing
parenthesis or similar. Thus, trimming the fat will help narrow down the
problem.
Regards,
Malcolm