Created
June 16, 2011 15:25
-
-
Save actuosus/1029483 to your computer and use it in GitHub Desktop.
Debug toolbar OPTIONS request traceback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traceback (most recent call last): | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 273, in __call__ | |
response = self.get_response(request) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/core/handlers/base.py", line 182, in get_response | |
response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/core/handlers/base.py", line 203, in handle_uncaught_exception | |
return debug.technical_500_response(request, *exc_info) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/core/handlers/base.py", line 178, in get_response | |
response = middleware_method(request, response) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/debug_toolbar/middleware.py", line 106, in process_response | |
smart_unicode(self.debug_toolbars[request].render_toolbar() + self.tag)) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/debug_toolbar/toolbar/loader.py", line 78, in render_toolbar | |
return render_to_string('debug_toolbar/base.html', context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/loader.py", line 183, in render_to_string | |
return t.render(Context(dictionary)) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/base.py", line 123, in render | |
return self._render(context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/test/utils.py", line 57, in instrumented_test_render | |
return self.nodelist.render(context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/base.py", line 744, in render | |
bits.append(self.render_node(node, context)) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/debug.py", line 73, in render_node | |
result = node.render(context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/defaulttags.py", line 227, in render | |
nodelist.append(node.render(context)) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/defaulttags.py", line 311, in render | |
return self.nodelist_true.render(context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/base.py", line 744, in render | |
bits.append(self.render_node(node, context)) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/debug.py", line 73, in render_node | |
result = node.render(context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/debug.py", line 90, in render | |
output = self.filter_expression.resolve(context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/base.py", line 510, in resolve | |
obj = self.var.resolve(context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/base.py", line 653, in resolve | |
value = self._resolve_lookup(context) | |
File "/projects/.virtualenv/lib/python2.6/site-packages/django/template/base.py", line 698, in _resolve_lookup | |
current = current() | |
File "/projects/.virtualenv/lib/python2.6/site-packages/debug_toolbar/panels/request_vars.py", line 35, in content | |
'view_func': '%s.%s' % (self.view_func.__module__, self.view_func.__name__), | |
TemplateSyntaxError: Caught AttributeError while rendering: 'RequestVarsDebugPanel' object has no attribute 'view_func' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import httplib, urllib | |
host = '127.0.0.1' | |
port = '8000' | |
connection = httplib.HTTPConnection(host, port) | |
headers = { | |
'Host': host, | |
'Content-type': 'application/x-www-form-urlencoded', | |
'Connection': 'keep-alive', | |
'Keep-Alive': '115', | |
'Access-Control-Request-Method': 'POST', | |
'Access-Control-Request-Headers': 'x-requested-with', | |
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.44 Safari/534.24', | |
'Accept': '*/*', | |
'Accept-Language': 'en-us,en;q=0.7,ru;q=0.3', | |
'Accept-Encoding': 'gzip, deflate', | |
'Accept-Charset': 'UTF-8,*', | |
'Origin': 'http://127.0.0.1:8000' | |
} | |
connection.request('OPTIONS', '/login/', '', headers) | |
response = con.getresponse() | |
print response.status, response.reason |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment