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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s