Saturday, August 25, 2012

Django type object 'Http404' has no attribute 'status_code' Error

No problem when testing on localhost server, but when deployed to heroku, it reports this problem. And the reason turns out to that for Http404, you should raise it instead of return it:

except UserDomainURL.DoesNotExist:
        raise Http404

No comments:

Post a Comment