Search code examples
djangodjango-piston

Django piston, doesn't work, some TypRerror


Where could be the error?

My code is pretty usual.

http://pastebin.com/cFfNNGm5 http://wklej.org/id/518600/ < - This is it

And some my code:

http://wklej.org/id/518601/

Without imports


Solution

  • It seems that you added your authentication inappropriately: resource.Resource(... authentication=MyAuthenticationClass) instead of resource.Resource(..., authentication=MyAuthenticationClass()). Types don't match (a type instead of its instance), hence the whole problem.