Django — AttributeError: ‘Http404’ object has no attribute ‘status_code’

If you get this error, it might be because you are returning Http404 instead of raise ing it.

You must raise django.http.Http404, not return it.

That’s all!

Advertisements

6 thoughts on “Django — AttributeError: ‘Http404’ object has no attribute ‘status_code’

    1. Facepalm!

      Thanks for the comment Michael, I ended up reading through every post on your blog.. what an awesome combination of topics.

      You absolutely need a subscribe by email!

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