Django — ‘NoneType’ object has no attribute ‘has_header’

‘NoneType’ object has no attribute ‘has_header’

on if not response.has_header(‘ETag’):

This error appears if you don’t return anything from your view.

return direct_to_template(request, "template")

I wonder if this is a new error message? I recall a more specific error in my previous version of django, something along the lines of “Your view didn’t return anything!”

Advertisements

One thought on “Django — ‘NoneType’ object has no attribute ‘has_header’

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