AttributeError: ‘str’ object has no attribute ‘status_code’

Ahh yes, looks much like this one here:

https://yuji.wordpress.com/2008/11/27/django-attributeerror-http404-object-has-no-attribute-status_code/

Happens when you return something directly instead of in an HttpResponse-type object.

Make sure your views return django httpresponse objects, not lists, strings, etc.

1 Comment

  1. titato says:

    haizzzz can i sleep in your heart

Leave a reply to titato Cancel reply