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!”

1 Comment

  1. Seyi says:

    Thanks man…

Leave a Comment