Closed george-quaye-sap-com closed 11 years ago
With the above trace it is hard to understand what went wrong. It doesn't even have line numbers. Kindly set DEBUG=True in the settings.py and use the below logging configurations. This will print the exact queries that were sent for execution and will help me track the problem faster.
LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'filters': { 'require_debug_false': { '()': 'django.utils.log.RequireDebugFalse' } }, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler' },'console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', }, }, 'loggers': { 'django.request': { 'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True, },'django.db.backends': { 'level': 'DEBUG', 'handers': ['console'], }, } }
The error page is complex... and not easily attahced or shown in cut and paste... so, I got the page source and pasting the entire html...
<!DOCTYPE html>
(257, 'sql syntax error: incorrect syntax near ",": line 12 col 15 (at pos 457)')
Request Method: | GET |
---|---|
Request URL: | http://10.48.171.221:8000/question/1141/this-is-a-test-of-adding-a-question234 |
Django Version: | 1.4.2 |
Exception Type: | Error |
Exception Value: | (257, 'sql syntax error: incorrect syntax near ",": line 12 col 15 (at pos 457)') |
Exception Location: | /usr/local/lib/python2.7/dist-packages/hdbcli/dbapi.py in __execute, line 244 |
Python Executable: | /usr/local/bin/python |
Python Version: | 2.7.3 |
Python Path: | ['/home/lroot/sap_hana_answers_server/server', '/home/lroot/sap_hana_answers_server/server/src/pysaml2/src', '/usr/local/lib/python2.7/dist-packages/distribute-0.6.35-py2.7.egg', '/home/lroot/sap_hana_answers_server/server/src/django-haystack', '/home/lroot/sap_hana_answers_server/server', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages', '/home/ubuntu/sap-hana-error/server'] |
Server time: | Fri, 29 Mar 2013 20:50:08 +0100 |
/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py
in get_response
for middleware_method in self._view_middleware:
response = middleware_method(request, callback, callback_args, callback_kwargs)
if response:
break
if response is None:
try:
response = callback(request, *callback_args, **callback_kwargs)...
except Exception, e:
# If the view raised an exception, run it through exception
# middleware, and if the exception middleware returns a
# response, use that. Otherwise, reraise the exception.
for middleware_method in self._exception_middleware:
response = middleware_method(request, e)
Variable | Value |
---|---|
exceptions | <module 'django.core.exceptions' from '/usr/local/lib/python2.7/dist-packages/django/core/exceptions.pyc'> |
e | Error(257, 'sql syntax error: incorrect syntax near ",": line 12 col 15 (at pos 457)') |
callback_args | () |
settings | <django.conf.LazySettings object at 0x18551d0> |
middleware_method | <bound method MessageMiddleware.process_request of <django.contrib.messages.middleware.MessageMiddleware object at 0x7fefb4005690>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x236d150> |
request | "<WSGIRequest\npath:/question/1141/this-is-a-test-of-adding-a-question234,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'csrftoken': 'PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ',\n 'sessionid': 'e939f0325dd83398e572dbf63aa48581'},\nMETA:{'CONTENT_LENGTH': '',\n 'CONTENT_TYPE': 'text/plain',\n 'DJANGO_SETTINGS_MODULE': 'server.settings',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HOME': '/home/lroot',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',\n 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',\n 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',\n 'HTTP_CACHE_CONTROL': 'max-age=0',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'csrftoken=PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ; sessionid=e939f0325dd83398e572dbf63aa48581',\n 'HTTP_HOST': '10.48.171.221:8000',\n 'HTTP_REFERER': 'http://10.48.171.221:8000/ask',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',\n 'LANG': 'en_US.UTF-8',\n 'LESSCLOSE': '/usr/bin/lesspipe %s %s',\n 'LESSOPEN': '| /usr/bin/lesspipe %s',\n 'LOGNAME': 'lroot',\n 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:',\n 'MAIL': '/var/mail/lroot',\n 'OLDPWD': '/home/lroot',\n 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',\n 'PATH_INFO': u'/question/1141/this-is-a-test-of-adding-a-question234',\n 'PWD': '/home/lroot/sap_hana_answers_server/server',\n 'PYTHONPATH': ':/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '10.48.241.43',\n 'REMOTE_HOST': '',\n 'REQUEST_METHOD': 'GET',\n 'RUN_MAIN': 'true',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'george.pal.sap.corp',\n 'SERVER_PORT': '8000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3rc1',\n 'SHELL': '/bin/bash',\n 'SHLVL': '1',\n 'SSH_CLIENT': '10.48.241.43 64953 22',\n 'SSH_CONNECTION': '10.48.241.43 64953 10.48.171.221 22',\n 'SSH_TTY': '/dev/pts/0',\n 'TERM': 'xterm',\n 'TZ': 'Europe/Berlin',\n 'USER': 'lroot',\n 'XDG_SESSION_COOKIE': '13ff287091c3db8e81d4af57000001e8-1364584454.735821-20045594',\n '_': '/usr/local/bin/python',\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fefd8385270>,\n 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x1db6bb0>,\n 'wsgi.input': <socket._fileobject object at 0x7fefc804b3d0>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
callback | <webapp.views.QuestionResource object at 0x7fefc00630d0> |
resolver | <RegexURLResolver server.urls (None:None) ^/> |
urlresolvers | <module 'django.core.urlresolvers' from '/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.pyc'> |
callback_kwargs | {'id': u'1141', 'slug': u'this-is-a-test-of-adding-a-question234'} |
response | None |
urlconf | 'server.urls' |
/home/lroot/sap_hana_answers_server/server/webapp/decorators.py
in _decorated
"""
def _decorated(*args, **kwargs):
request = args[0] if isinstance(args[0], WSGIRequest) else args[1]
if (request.user and request.user.is_authenticated()\
and (request.user.username.startswith("I")\
or request.user.username.startswith("D")\
or request.user.username.startswith("C"))) or (request.user and request.user.is_staff):
return the_func(*args, **kwargs)...
else:
return HttpResponseRedirect("/")
return _decorated
Variable | Value |
---|---|
args | (<webapp.views.QuestionResource object at 0x7fefc00630d0>, ``` <WSGIRequest path:/question/1141/this-is-a-test-of-adding-a-question234, GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'csrftoken': 'PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ', 'sessionid': 'e939f0325dd83398e572dbf63aa48581'}, META:{'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE': 'server.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HOME': '/home/lroot', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,_;q=0.3', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'csrftoken=PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ; sessionid=e939f0325dd83398e572dbf63aa48581', 'HTTP_HOST': '10.48.171.221:8000', 'HTTP_REFERER': 'http://10.48.171.221:8000/ask', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LOGNAME': 'lroot', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:_.tar=01;31:_.tgz=01;31:_.arj=01;31:_.taz=01;31:_.lzh=01;31:_.lzma=01;31:_.tlz=01;31:_.txz=01;31:_.zip=01;31:_.z=01;31:_.Z=01;31:_.dz=01;31:_.gz=01;31:_.lz=01;31:_.xz=01;31:_.bz2=01;31:_.bz=01;31:_.tbz=01;31:_.tbz2=01;31:_.tz=01;31:_.deb=01;31:_.rpm=01;31:_.jar=01;31:_.war=01;31:_.ear=01;31:_.sar=01;31:_.rar=01;31:_.ace=01;31:_.zoo=01;31:_.cpio=01;31:_.7z=01;31:_.rz=01;31:_.jpg=01;35:_.jpeg=01;35:_.gif=01;35:_.bmp=01;35:_.pbm=01;35:_.pgm=01;35:_.ppm=01;35:_.tga=01;35:_.xbm=01;35:_.xpm=01;35:_.tif=01;35:_.tiff=01;35:_.png=01;35:_.svg=01;35:_.svgz=01;35:_.mng=01;35:_.pcx=01;35:_.mov=01;35:_.mpg=01;35:_.mpeg=01;35:_.m2v=01;35:_.mkv=01;35:_.webm=01;35:_.ogm=01;35:_.mp4=01;35:_.m4v=01;35:_.mp4v=01;35:_.vob=01;35:_.qt=01;35:_.nuv=01;35:_.wmv=01;35:_.asf=01;35:_.rm=01;35:_.rmvb=01;35:_.flc=01;35:_.avi=01;35:_.fli=01;35:_.flv=01;35:_.gl=01;35:_.dl=01;35:_.xcf=01;35:_.xwd=01;35:_.yuv=01;35:_.cgm=01;35:_.emf=01;35:_.axv=01;35:_.anx=01;35:_.ogv=01;35:_.ogx=01;35:_.aac=00;36:_.au=00;36:_.flac=00;36:_.mid=00;36:_.midi=00;36:_.mka=00;36:_.mp3=00;36:_.mpc=00;36:_.ogg=00;36:_.ra=00;36:_.wav=00;36:_.axa=00;36:_.oga=00;36:_.spx=00;36:*.xspf=00;36:', 'MAIL': '/var/mail/lroot', 'OLDPWD': '/home/lroot', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/question/1141/this-is-a-test-of-adding-a-question234', 'PWD': '/home/lroot/sap_hana_answers_server/server', 'PYTHONPATH': ':/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages', 'QUERY_STRING': '', 'REMOTE_ADDR': '10.48.241.43', 'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u'', 'SERVER_NAME': 'george.pal.sap.corp', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3rc1', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_CLIENT': '10.48.241.43 64953 22', 'SSH_CONNECTION': '10.48.241.43 64953 10.48.171.221 22', 'SSH_TTY': '/dev/pts/0', 'TERM': 'xterm', 'TZ': 'Europe/Berlin', 'USER': 'lroot', 'XDG_SESSION_COOKIE': '13ff287091c3db8e81d4af57000001e8-1364584454.735821-20045594', '_': '/usr/local/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fefd8385270>, 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x1db6bb0>, 'wsgi.input': <socket._fileobject object at 0x7fefc804b3d0>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>) |
request | "<WSGIRequest\npath:/question/1141/this-is-a-test-of-adding-a-question234,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'csrftoken': 'PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ',\n 'sessionid': 'e939f0325dd83398e572dbf63aa48581'},\nMETA:{'CONTENT_LENGTH': '',\n 'CONTENT_TYPE': 'text/plain',\n 'DJANGO_SETTINGS_MODULE': 'server.settings',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HOME': '/home/lroot',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',\n 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',\n 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',\n 'HTTP_CACHE_CONTROL': 'max-age=0',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'csrftoken=PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ; sessionid=e939f0325dd83398e572dbf63aa48581',\n 'HTTP_HOST': '10.48.171.221:8000',\n 'HTTP_REFERER': 'http://10.48.171.221:8000/ask',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',\n 'LANG': 'en_US.UTF-8',\n 'LESSCLOSE': '/usr/bin/lesspipe %s %s',\n 'LESSOPEN': '| /usr/bin/lesspipe %s',\n 'LOGNAME': 'lroot',\n 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:',\n 'MAIL': '/var/mail/lroot',\n 'OLDPWD': '/home/lroot',\n 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',\n 'PATH_INFO': u'/question/1141/this-is-a-test-of-adding-a-question234',\n 'PWD': '/home/lroot/sap_hana_answers_server/server',\n 'PYTHONPATH': ':/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '10.48.241.43',\n 'REMOTE_HOST': '',\n 'REQUEST_METHOD': 'GET',\n 'RUN_MAIN': 'true',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'george.pal.sap.corp',\n 'SERVER_PORT': '8000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3rc1',\n 'SHELL': '/bin/bash',\n 'SHLVL': '1',\n 'SSH_CLIENT': '10.48.241.43 64953 22',\n 'SSH_CONNECTION': '10.48.241.43 64953 10.48.171.221 22',\n 'SSH_TTY': '/dev/pts/0',\n 'TERM': 'xterm',\n 'TZ': 'Europe/Berlin',\n 'USER': 'lroot',\n 'XDG_SESSION_COOKIE': '13ff287091c3db8e81d4af57000001e8-1364584454.735821-20045594',\n '_': '/usr/local/bin/python',\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fefd8385270>,\n 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x1db6bb0>,\n 'wsgi.input': <socket._fileobject object at 0x7fefc804b3d0>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
the_func | <function __call__ at 0x7fefc0065c08> |
kwargs | {'id': u'1141', 'slug': u'this-is-a-test-of-adding-a-question234'} |
/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py
in _wrapped_view_func
def never_cache(view_func):
"""
Decorator that adds headers to a response so that it will
never be cached.
"""
@wraps(view_func, assigned=available_attrs(view_func))
def _wrapped_view_func(request, *args, **kwargs):
response = view_func(request, *args, **kwargs)...
add_never_cache_headers(response)
return response
return _wrapped_view_func
Variable | Value |
---|---|
args | (<WSGIRequest ``` path:/question/1141/this-is-a-test-of-adding-a-question234, GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{'csrftoken': 'PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ', 'sessionid': 'e939f0325dd83398e572dbf63aa48581'}, META:{'CONTENT_LENGTH': '', 'CONTENT_TYPE': 'text/plain', 'DJANGO_SETTINGS_MODULE': 'server.settings', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HOME': '/home/lroot', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,_;q=0.3', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'HTTP_CACHE_CONTROL': 'max-age=0', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'csrftoken=PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ; sessionid=e939f0325dd83398e572dbf63aa48581', 'HTTP_HOST': '10.48.171.221:8000', 'HTTP_REFERER': 'http://10.48.171.221:8000/ask', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22', 'LANG': 'en_US.UTF-8', 'LESSCLOSE': '/usr/bin/lesspipe %s %s', 'LESSOPEN': '| /usr/bin/lesspipe %s', 'LOGNAME': 'lroot', 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:_.tar=01;31:_.tgz=01;31:_.arj=01;31:_.taz=01;31:_.lzh=01;31:_.lzma=01;31:_.tlz=01;31:_.txz=01;31:_.zip=01;31:_.z=01;31:_.Z=01;31:_.dz=01;31:_.gz=01;31:_.lz=01;31:_.xz=01;31:_.bz2=01;31:_.bz=01;31:_.tbz=01;31:_.tbz2=01;31:_.tz=01;31:_.deb=01;31:_.rpm=01;31:_.jar=01;31:_.war=01;31:_.ear=01;31:_.sar=01;31:_.rar=01;31:_.ace=01;31:_.zoo=01;31:_.cpio=01;31:_.7z=01;31:_.rz=01;31:_.jpg=01;35:_.jpeg=01;35:_.gif=01;35:_.bmp=01;35:_.pbm=01;35:_.pgm=01;35:_.ppm=01;35:_.tga=01;35:_.xbm=01;35:_.xpm=01;35:_.tif=01;35:_.tiff=01;35:_.png=01;35:_.svg=01;35:_.svgz=01;35:_.mng=01;35:_.pcx=01;35:_.mov=01;35:_.mpg=01;35:_.mpeg=01;35:_.m2v=01;35:_.mkv=01;35:_.webm=01;35:_.ogm=01;35:_.mp4=01;35:_.m4v=01;35:_.mp4v=01;35:_.vob=01;35:_.qt=01;35:_.nuv=01;35:_.wmv=01;35:_.asf=01;35:_.rm=01;35:_.rmvb=01;35:_.flc=01;35:_.avi=01;35:_.fli=01;35:_.flv=01;35:_.gl=01;35:_.dl=01;35:_.xcf=01;35:_.xwd=01;35:_.yuv=01;35:_.cgm=01;35:_.emf=01;35:_.axv=01;35:_.anx=01;35:_.ogv=01;35:_.ogx=01;35:_.aac=00;36:_.au=00;36:_.flac=00;36:_.mid=00;36:_.midi=00;36:_.mka=00;36:_.mp3=00;36:_.mpc=00;36:_.ogg=00;36:_.ra=00;36:_.wav=00;36:_.axa=00;36:_.oga=00;36:_.spx=00;36:*.xspf=00;36:', 'MAIL': '/var/mail/lroot', 'OLDPWD': '/home/lroot', 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games', 'PATH_INFO': u'/question/1141/this-is-a-test-of-adding-a-question234', 'PWD': '/home/lroot/sap_hana_answers_server/server', 'PYTHONPATH': ':/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages', 'QUERY_STRING': '', 'REMOTE_ADDR': '10.48.241.43', 'REMOTE_HOST': '', 'REQUEST_METHOD': 'GET', 'RUN_MAIN': 'true', 'SCRIPT_NAME': u'', 'SERVER_NAME': 'george.pal.sap.corp', 'SERVER_PORT': '8000', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3rc1', 'SHELL': '/bin/bash', 'SHLVL': '1', 'SSH_CLIENT': '10.48.241.43 64953 22', 'SSH_CONNECTION': '10.48.241.43 64953 10.48.171.221 22', 'SSH_TTY': '/dev/pts/0', 'TERM': 'xterm', 'TZ': 'Europe/Berlin', 'USER': 'lroot', 'XDG_SESSION_COOKIE': '13ff287091c3db8e81d4af57000001e8-1364584454.735821-20045594', '_': '/usr/local/bin/python', 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fefd8385270>, 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x1db6bb0>, 'wsgi.input': <socket._fileobject object at 0x7fefc804b3d0>, 'wsgi.multiprocess': False, 'wsgi.multithread': True, 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.version': (1, 0)}>,) |
request | <webapp.views.QuestionResource object at 0x7fefc00630d0> |
view_func | <function __call__ at 0x7fefc0065b90> |
kwargs | {'id': u'1141', 'slug': u'this-is-a-test-of-adding-a-question234'} |
/home/lroot/sap_hana_answers_server/server/webapp/views.py
in __call__
@never_cache
def __call__(self, request, id=None, **kwargs):
if id is None and request.method == 'GET':
return self.read_all(request)
elif id is None and request.method == 'POST':
return self.create(request)
elif id is not None and request.method == 'GET':
return self.read(request, id)...
elif id is not None and (request.POST.get("_method","") == "delete" or request.method == 'DELETE'):
return self.delete(request, id)
elif id is not None and request.method == 'POST':
return self.update(request, id)
else:
return HttpResponse('INVALID METHOD', status=405)
Variable | Value |
---|---|
self | <webapp.views.QuestionResource object at 0x7fefc00630d0> |
request | "<WSGIRequest\npath:/question/1141/this-is-a-test-of-adding-a-question234,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'csrftoken': 'PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ',\n 'sessionid': 'e939f0325dd83398e572dbf63aa48581'},\nMETA:{'CONTENT_LENGTH': '',\n 'CONTENT_TYPE': 'text/plain',\n 'DJANGO_SETTINGS_MODULE': 'server.settings',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HOME': '/home/lroot',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',\n 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',\n 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',\n 'HTTP_CACHE_CONTROL': 'max-age=0',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'csrftoken=PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ; sessionid=e939f0325dd83398e572dbf63aa48581',\n 'HTTP_HOST': '10.48.171.221:8000',\n 'HTTP_REFERER': 'http://10.48.171.221:8000/ask',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',\n 'LANG': 'en_US.UTF-8',\n 'LESSCLOSE': '/usr/bin/lesspipe %s %s',\n 'LESSOPEN': '| /usr/bin/lesspipe %s',\n 'LOGNAME': 'lroot',\n 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:',\n 'MAIL': '/var/mail/lroot',\n 'OLDPWD': '/home/lroot',\n 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',\n 'PATH_INFO': u'/question/1141/this-is-a-test-of-adding-a-question234',\n 'PWD': '/home/lroot/sap_hana_answers_server/server',\n 'PYTHONPATH': ':/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '10.48.241.43',\n 'REMOTE_HOST': '',\n 'REQUEST_METHOD': 'GET',\n 'RUN_MAIN': 'true',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'george.pal.sap.corp',\n 'SERVER_PORT': '8000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3rc1',\n 'SHELL': '/bin/bash',\n 'SHLVL': '1',\n 'SSH_CLIENT': '10.48.241.43 64953 22',\n 'SSH_CONNECTION': '10.48.241.43 64953 10.48.171.221 22',\n 'SSH_TTY': '/dev/pts/0',\n 'TERM': 'xterm',\n 'TZ': 'Europe/Berlin',\n 'USER': 'lroot',\n 'XDG_SESSION_COOKIE': '13ff287091c3db8e81d4af57000001e8-1364584454.735821-20045594',\n '_': '/usr/local/bin/python',\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fefd8385270>,\n 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x1db6bb0>,\n 'wsgi.input': <socket._fileobject object at 0x7fefc804b3d0>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
id | u'1141' |
kwargs | {'slug': u'this-is-a-test-of-adding-a-question234'} |
/home/lroot/sap_hana_answers_server/server/webapp/views.py
in read
return HttpResponseRedirect("/")
question = question[0]
user = request.user if request.user.is_authenticated() else None
rel_questions = self._get_related_questions(int(id)) # [q.as_dict() for q in self._get_related_questions(int(id))]
rel_tags = Set(question.tags.all())
for q in rel_questions:...
for tag in q.tags.all():
rel_tags.add(tag)
question.views += 1
question.save()
Variable | Value |
---|---|
question | <Question: 1141/This is a test of adding a question234> |
self | <webapp.views.QuestionResource object at 0x7fefc00630d0> |
rel_tags | Set([<Tag: question2>]) |
request | "<WSGIRequest\npath:/question/1141/this-is-a-test-of-adding-a-question234,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{'csrftoken': 'PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ',\n 'sessionid': 'e939f0325dd83398e572dbf63aa48581'},\nMETA:{'CONTENT_LENGTH': '',\n 'CONTENT_TYPE': 'text/plain',\n 'DJANGO_SETTINGS_MODULE': 'server.settings',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HOME': '/home/lroot',\n 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',\n 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',\n 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8',\n 'HTTP_CACHE_CONTROL': 'max-age=0',\n 'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_COOKIE': 'csrftoken=PrC9gyWXl2yHEU9zOOTV4jvEUJz5c6QZ; sessionid=e939f0325dd83398e572dbf63aa48581',\n 'HTTP_HOST': '10.48.171.221:8000',\n 'HTTP_REFERER': 'http://10.48.171.221:8000/ask',\n 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22',\n 'LANG': 'en_US.UTF-8',\n 'LESSCLOSE': '/usr/bin/lesspipe %s %s',\n 'LESSOPEN': '| /usr/bin/lesspipe %s',\n 'LOGNAME': 'lroot',\n 'LS_COLORS': 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:',\n 'MAIL': '/var/mail/lroot',\n 'OLDPWD': '/home/lroot',\n 'PATH': '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games',\n 'PATH_INFO': u'/question/1141/this-is-a-test-of-adding-a-question234',\n 'PWD': '/home/lroot/sap_hana_answers_server/server',\n 'PYTHONPATH': ':/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '10.48.241.43',\n 'REMOTE_HOST': '',\n 'REQUEST_METHOD': 'GET',\n 'RUN_MAIN': 'true',\n 'SCRIPT_NAME': u'',\n 'SERVER_NAME': 'george.pal.sap.corp',\n 'SERVER_PORT': '8000',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SOFTWARE': 'WSGIServer/0.1 Python/2.7.3rc1',\n 'SHELL': '/bin/bash',\n 'SHLVL': '1',\n 'SSH_CLIENT': '10.48.241.43 64953 22',\n 'SSH_CONNECTION': '10.48.241.43 64953 10.48.171.221 22',\n 'SSH_TTY': '/dev/pts/0',\n 'TERM': 'xterm',\n 'TZ': 'Europe/Berlin',\n 'USER': 'lroot',\n 'XDG_SESSION_COOKIE': '13ff287091c3db8e81d4af57000001e8-1364584454.735821-20045594',\n '_': '/usr/local/bin/python',\n 'wsgi.errors': <open file '<stderr>', mode 'w' at 0x7fefd8385270>,\n 'wsgi.file_wrapper': <class wsgiref.util.FileWrapper at 0x1db6bb0>,\n 'wsgi.input': <socket._fileobject object at 0x7fefc804b3d0>,\n 'wsgi.multiprocess': False,\n 'wsgi.multithread': True,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
rel_questions | <RawQuerySet: '\n SELECT q.* FROM\n webapp_question q INNER JOIN ( \n SELECT wqt2.question_id, count(*) as count\n FROM webapp_question_tags wqt1, webapp_question_tags wqt2\n WHERE wqt1.tag_id=wqt2.tag_id \n AND wqt1.question_id <> wqt2.question_id\n AND wqt1.question_id = 1141\n GROUP BY wqt2.question_id\n ) qt2 ON qt2.question_id = q.post_ptr_id\n ORDER BY qt2.count DESC\n LIMIT 0, 10\n '> |
user | <django.utils.functional.SimpleLazyObject object at 0x7fefb045ebd0> |
id | u'1141' |
/usr/local/lib/python2.7/dist-packages/django/db/models/query.py
in __iter__
# Cache some things for performance reasons outside the loop.
db = self.db
compiler = connections[db].ops.compiler('SQLCompiler')(
self.query, connections[db], db
)
need_resolv_columns = hasattr(compiler, 'resolve_columns')
query = iter(self.query)...
# Find out which columns are model's fields, and which ones should be
# annotated to the model.
for pos, column in enumerate(self.columns):
if column in self.model_fields:
model_init_field_names[self.model_fields[column].attname] = pos
Variable | Value |
---|---|
annotation_fields | [] |
model_init_field_names | {} |
db | 'default' |
need_resolv_columns | False |
self | <RawQuerySet: '\n SELECT q.* FROM\n webapp_question q INNER JOIN ( \n SELECT wqt2.question_id, count(*) as count\n FROM webapp_question_tags wqt1, webapp_question_tags wqt2\n WHERE wqt1.tag_id=wqt2.tag_id \n AND wqt1.question_id <> wqt2.question_id\n AND wqt1.question_id = 1141\n GROUP BY wqt2.question_id\n ) qt2 ON qt2.question_id = q.post_ptr_id\n ORDER BY qt2.count DESC\n LIMIT 0, 10\n '> |
compiler | <django.db.backends.hana.compiler.SQLCompiler object at 0x7fefb045eed0> |
/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py
in __iter__
converter = connections[self.using].introspection.table_name_converter
return [converter(column_meta[0])
for column_meta in self.cursor.description]
def __iter__(self):
# Always execute a new query for a new iterator.
# This could be optimized with a cache at the expense of RAM.
self._execute_query()...
if not connections[self.using].features.can_use_chunked_reads:
# If the database can't use chunked reads we need to make sure we
# evaluate the entire query up front.
result = list(self.cursor)
else:
result = self.cursor
Variable | Value |
---|---|
self | <RawQuery: '\n SELECT q.* FROM\n webapp_question q INNER JOIN ( \n SELECT wqt2.question_id, count(*) as count\n FROM webapp_question_tags wqt1, webapp_question_tags wqt2\n WHERE wqt1.tag_id=wqt2.tag_id \n AND wqt1.question_id <> wqt2.question_id\n AND ``` |
"Attempting to post a new question and encountered this error... the info did get posted to the table"
Environment: Request Method: GET Request URL: http://10.48.171.221:8000/question/1/first-question
Django Version: 1.4.2 Python Version: 2.7.3 Installed Applications: ('django_extensions', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'grappelli', 'django.contrib.admin', 'haystack', 'webapp') Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware')
Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response
Exception Type: Error at /question/1/first-question Exception Value: (257, 'sql syntax error: incorrect syntax near ",": line 12 col 15 (at pos 457)')