I'm testing a django project using the test sever when it gives me the following exception
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py", line 280, in run self.result = application(self.environ, self.start_response)
File "/usr/lib/pymodules/python2.6/django/core/servers/basehttp.py", line 674, in >call return self.application(environ, start_response)
File "/usr/lib/pymodules/python2.6/django/core/handlers/wsgi.py", line 245, in call response = middleware_method(request, response)
File "/usr/lib/pymodules/python2.6/django/middleware/common.py", line 84, in >process_response if response.status_code == 404:
AttributeError: 'search' object has no attribute 'status_code'
Just from reading this traceback, I don't think the problem is in my code, but I'm not sure. Could someone look through my code and help me solve this problem? my code is hosted on GitHub and any other comments or suggestions are greatly appreciated. Thanks in advance for your time and consideration.
search
it will return what? for sure not a HttpResponse instance - and this is exactly source of your problem – Jerzyk.gitignore
read pep8 python.org/dev/peps/pep-0008 – Jerzyk