no such table: articles_article
Request Method: | GET |
---|---|
Request URL: | http://bbs.ccose.org/research/ |
Django Version: | 1.4.22 |
Exception Type: | DatabaseError |
Exception Value: | no such table: articles_article |
Exception Location: | /usr/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py in execute, line 344 |
Python Executable: | /usr/bin/python |
Python Version: | 2.7.5 |
Python Path: | ['/home/mycode/ccose_deploy/ccose', '/usr/lib64/python27.zip', '/usr/lib64/python2.7', '/usr/lib64/python2.7/plat-linux2', '/usr/lib64/python2.7/lib-tk', '/usr/lib64/python2.7/lib-old', '/usr/lib64/python2.7/lib-dynload', '/usr/lib64/python2.7/site-packages', '/usr/lib/python2.7/site-packages'] |
Server time: | 星期五, 29 三月 2024 21:26:39 +0800 |
/usr/lib/python2.7/site-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/lib/python2.7/site-packages/django/core/exceptions.pyc'> |
e | DatabaseError('no such table: articles_article',) |
callback_args | () |
settings | <django.conf.LazySettings object at 0x7f4ead284dd0> |
middleware_method | <bound method MessageMiddleware.process_request of <django.contrib.messages.middleware.MessageMiddleware object at 0x7f4eadbd6a50>> |
self | <django.core.handlers.wsgi.WSGIHandler object at 0x7f4ead87fe90> |
request | "<WSGIRequest\npath:/research/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'CONTEXT_DOCUMENT_ROOT': '/home/mycode/ccose_deploy/ccose/',\n 'CONTEXT_PREFIX': '',\n 'DOCUMENT_ROOT': '/home/mycode/ccose_deploy/ccose/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_HOST': 'bbs.ccose.org',\n 'HTTP_REFERER': 'http://bbs.ccose.org/research',\n 'HTTP_USER_AGENT': 'claudebot',\n 'PATH_INFO': u'/research/',\n 'PATH_TRANSLATED': '/home/mycode/ccose_deploy/ccose/ccose/wsgi.py/research/',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '3.236.57.1',\n 'REMOTE_PORT': '42684',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_SCHEME': 'http',\n 'REQUEST_URI': '/research/',\n 'SCRIPT_FILENAME': '/home/mycode/ccose_deploy/ccose/ccose/wsgi.py',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.122.253',\n 'SERVER_ADMIN': 'wenyuejie@126.com',\n 'SERVER_NAME': 'bbs.ccose.org',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SIGNATURE': '',\n 'SERVER_SOFTWARE': 'Apache/2.4.6 (CentOS) PHP/7.0.32 mod_wsgi/3.4 Python/2.7.5',\n 'UNIQUE_ID': 'ZgbBj@0cuk57lAz0lcAeEAAAAAA',\n 'mod_wsgi.application_group': 'www.ccose.org|',\n 'mod_wsgi.callable_object': 'application',\n 'mod_wsgi.enable_sendfile': '0',\n 'mod_wsgi.handler_script': '',\n 'mod_wsgi.input_chunked': '0',\n 'mod_wsgi.listener_host': '',\n 'mod_wsgi.listener_port': '80',\n 'mod_wsgi.process_group': '',\n 'mod_wsgi.queue_start': '1711718799203065',\n 'mod_wsgi.request_handler': 'wsgi-script',\n 'mod_wsgi.script_reloading': '1',\n 'mod_wsgi.version': (3, 4),\n 'wsgi.errors': <mod_wsgi.Log object at 0x7f4eadff30b0>,\n 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f4eadf6c558>,\n 'wsgi.input': <mod_wsgi.Input object at 0x7f4eadff3170>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
callback | <function list at 0x7f4eade4b488> |
resolver | <RegexURLResolver ccose.urls (None:None) ^/> |
urlresolvers | <module 'django.core.urlresolvers' from '/usr/lib/python2.7/site-packages/django/core/urlresolvers.pyc'> |
callback_kwargs | {} |
response | None |
urlconf | 'ccose.urls' |
/home/mycode/ccose_deploy/ccose/articles/views.py
in list
def mbsede(request):
return render_to_response('ccoseweb/mbsede2022.html',{},context_instance = RequestContext(request))
# ------------- #
def list(request):
list0 = Article.objects.all()
return render_to_response('articles/list.html',{'list':list0},context_instance = RequestContext(request))...
def showAtcl(request):
if request.method == 'POST':
articleId = request.GET['id']
#hidden = request.POST['hidename']
Variable | Value |
---|---|
request | "<WSGIRequest\npath:/research/,\nGET:<QueryDict: {}>,\nPOST:<QueryDict: {}>,\nCOOKIES:{},\nMETA:{'CONTEXT_DOCUMENT_ROOT': '/home/mycode/ccose_deploy/ccose/',\n 'CONTEXT_PREFIX': '',\n 'DOCUMENT_ROOT': '/home/mycode/ccose_deploy/ccose/',\n 'GATEWAY_INTERFACE': 'CGI/1.1',\n 'HTTP_ACCEPT': '*/*',\n 'HTTP_HOST': 'bbs.ccose.org',\n 'HTTP_REFERER': 'http://bbs.ccose.org/research',\n 'HTTP_USER_AGENT': 'claudebot',\n 'PATH_INFO': u'/research/',\n 'PATH_TRANSLATED': '/home/mycode/ccose_deploy/ccose/ccose/wsgi.py/research/',\n 'QUERY_STRING': '',\n 'REMOTE_ADDR': '3.236.57.1',\n 'REMOTE_PORT': '42684',\n 'REQUEST_METHOD': 'GET',\n 'REQUEST_SCHEME': 'http',\n 'REQUEST_URI': '/research/',\n 'SCRIPT_FILENAME': '/home/mycode/ccose_deploy/ccose/ccose/wsgi.py',\n 'SCRIPT_NAME': u'',\n 'SERVER_ADDR': '192.168.122.253',\n 'SERVER_ADMIN': 'wenyuejie@126.com',\n 'SERVER_NAME': 'bbs.ccose.org',\n 'SERVER_PORT': '80',\n 'SERVER_PROTOCOL': 'HTTP/1.1',\n 'SERVER_SIGNATURE': '',\n 'SERVER_SOFTWARE': 'Apache/2.4.6 (CentOS) PHP/7.0.32 mod_wsgi/3.4 Python/2.7.5',\n 'UNIQUE_ID': 'ZgbBj@0cuk57lAz0lcAeEAAAAAA',\n 'mod_wsgi.application_group': 'www.ccose.org|',\n 'mod_wsgi.callable_object': 'application',\n 'mod_wsgi.enable_sendfile': '0',\n 'mod_wsgi.handler_script': '',\n 'mod_wsgi.input_chunked': '0',\n 'mod_wsgi.listener_host': '',\n 'mod_wsgi.listener_port': '80',\n 'mod_wsgi.process_group': '',\n 'mod_wsgi.queue_start': '1711718799203065',\n 'mod_wsgi.request_handler': 'wsgi-script',\n 'mod_wsgi.script_reloading': '1',\n 'mod_wsgi.version': (3, 4),\n 'wsgi.errors': <mod_wsgi.Log object at 0x7f4eadff30b0>,\n 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f4eadf6c558>,\n 'wsgi.input': <mod_wsgi.Input object at 0x7f4eadff3170>,\n 'wsgi.multiprocess': True,\n 'wsgi.multithread': False,\n 'wsgi.run_once': False,\n 'wsgi.url_scheme': 'http',\n 'wsgi.version': (1, 0)}>" |
list0 | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/shortcuts/__init__.py
in render_to_response
def render_to_response(*args, **kwargs):
"""
Returns a HttpResponse whose content is filled with the result of calling
django.template.loader.render_to_string() with the passed arguments.
"""
httpresponse_kwargs = {'mimetype': kwargs.pop('mimetype', None)}
return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)...
def render(request, *args, **kwargs):
"""
Returns a HttpResponse whose content is filled with the result of calling
django.template.loader.render_to_string() with the passed arguments.
Uses a RequestContext by default.
Variable | Value |
---|---|
httpresponse_kwargs | {'mimetype': None} |
args | Error in formatting: no such table: articles_article |
kwargs | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/loader.py
in render_to_string
t = get_template(template_name)
if not context_instance:
return t.render(Context(dictionary))
# Add the dictionary to the context stack, ensuring it gets removed again
# to keep the context_instance in the same state it started in.
context_instance.update(dictionary)
try:
return t.render(context_instance)...
finally:
context_instance.pop()
def select_template(template_name_list):
"Given a list of template names, returns the first that can be loaded."
if not template_name_list:
Variable | Value |
---|---|
template_name | 'articles/list.html' |
t | <django.template.base.Template object at 0x7f4eadff3890> |
dictionary | Error in formatting: no such table: articles_article |
context_instance | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/base.py
in render
def _render(self, context):
return self.nodelist.render(context)
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
return self._render(context)...
finally:
context.render_context.pop()
def compile_string(template_string, origin):
"Compiles template_string into NodeList ready for rendering"
if settings.TEMPLATE_DEBUG:
Variable | Value |
---|---|
self | <django.template.base.Template object at 0x7f4eadff3890> |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/base.py
in _render
def __iter__(self):
for node in self.nodelist:
for subnode in node:
yield subnode
def _render(self, context):
return self.nodelist.render(context)...
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
return self._render(context)
Variable | Value |
---|---|
self | <django.template.base.Template object at 0x7f4eadff3890> |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = self.render_node(node, context)...
else:
bit = node
bits.append(force_unicode(bit))
return mark_safe(u''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
node | <ExtendsNode: extends "base.html"> |
self | [<ExtendsNode: extends "base.html">] |
bits | [] |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/base.py
in render_node
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
return nodes
def render_node(self, node, context):
return node.render(context)...
class TextNode(Node):
def __init__(self, s):
self.s = s
def __repr__(self):
Variable | Value |
---|---|
node | <ExtendsNode: extends "base.html"> |
self | [<ExtendsNode: extends "base.html">] |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/loader_tags.py
in render
blocks = dict([(n.name, n) for n in
compiled_parent.nodelist.get_nodes_by_type(BlockNode)])
block_context.add_blocks(blocks)
break
# Call Template._render explicitly so the parser context stays
# the same.
return compiled_parent._render(context)...
class BaseIncludeNode(Node):
def __init__(self, *args, **kwargs):
self.extra_context = kwargs.pop('extra_context', {})
self.isolated_context = kwargs.pop('isolated_context', False)
super(BaseIncludeNode, self).__init__(*args, **kwargs)
Variable | Value |
---|---|
node | <Block Node: title. Contents: [<Text Node: ' CCOSE - ??????????? '>]> |
blocks | {u'main_content': <Block Node: main_content. Contents: [<Text Node: ' '>]>, u'main_content_feedback': <Block Node: main_content_feedback. Contents: [<Text Node: ' '>]>, u'title': <Block Node: title. Contents: [<Text Node: ' CCOSE - ??????????? '>]>} |
block_context | <django.template.loader_tags.BlockContext object at 0x7f4eadff37d0> |
n | <Block Node: main_content_feedback. Contents: [<Text Node: ' '>]> |
context | Error in formatting: no such table: articles_article |
compiled_parent | <django.template.base.Template object at 0x7f4eadff3f10> |
self | <ExtendsNode: extends "base.html"> |
/usr/lib/python2.7/site-packages/django/template/base.py
in _render
def __iter__(self):
for node in self.nodelist:
for subnode in node:
yield subnode
def _render(self, context):
return self.nodelist.render(context)...
def render(self, context):
"Display stage -- can be called many times"
context.render_context.push()
try:
return self._render(context)
Variable | Value |
---|---|
self | <django.template.base.Template object at 0x7f4eadff3f10> |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = self.render_node(node, context)...
else:
bit = node
bits.append(force_unicode(bit))
return mark_safe(u''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
node | <Block Node: main_content. Contents: [<Text Node: ' '>]> |
bit | u'\r\n\r\n\r\n\t<!-- main content -->\r\n\t<div class="content">\r\n\t\t<div class="content_resize">\r\n\r\n\t\t\t<div class="mainbar">\r\n\t\t\t\t\t' |
bits | [u'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r\n<html>\r\n\r\n\t<head>\r\n\t\t<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />\r\n\t\t<title> ', u' CCOSE - \u5b66\u672f\u521b\u65b0\uff0d\u6587\u7ae0\u5217\u8868 ', u'</title>\r\n\r\n\t\t<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\r\n\t\t<meta name="description" content="\u7cfb\u7edf\u5de5\u7a0b\uff0c\u6559\u80b2\u57f9\u8bad\uff0c\u54a8\u8be2\u670d\u52a1\uff0c\u4e2d\u56fd\u822a\u5929\uff0c\u6e05\u534e\u5927\u5b66\uff0c\u4e2d\u822a\u5de5\u4e1a\uff0c\u795e\u821f\u5b66\u9662" />\r\n\t\t<link href="/static/css/style.css" rel="stylesheet" type="text/css" />\r\n\r\n <script>\r\n \r\n // \u6765\u81ea baidu \u7edf\u8ba1\r\n var _hmt = _hmt || [];\r\n (function() {\r\n var hm = document.createElement("script");\r\n hm.src = "//hm.baidu.com/hm.js?9fbbbccfe69127d2dc85e8699acf4243";\r\n var s = document.getElementsByTagName("script")[0]; \r\n s.parentNode.insertBefore(hm, s);\r\n })();\r\n </script>\r\n\r\n\t\t\r\n\r\n\r\n\t</head>\r\n\r\n<body>\r\n\r\n\t<!--- header -->\r\n\t', u'\r\n<!-- header -->\r\n <div class="header">\r\n <div class="header_resize">\r\n\r\n\t\t<div class="header_logo">\r\n\t\t\t<div class="header_logo_left"> C <span class="ColorFFF">COSE</span>\t</div>\r\n\t\t\t<div class="header_logo_right">\r\n\t\t\t\t</br>\r\n\t\t\t\t\u7cfb\u7edf\u5de5\u7a0b\u7231\u597d\u8005\u6c99\u9f99\r\n\t\t\t</div>\r\n\t\t</div>\r\n\r\n \r\n \r\n <div class="menu_nav">\r\n <ul>\r\n\t\t\t \r\n<!-- modules -->\r\n\r\n\r\n\t\t\t <li><a href="/index">\u9996\u9875</a></li>\r\n\t\t\t <li><a href="/charter">\u534f\u4f1a\u7ae0\u7a0b</a></li>\r\n\t\t\t <li><a href="/notices">\u6d3b\u52a8\u901a\u77e5</a></li>\r\n\t\t\t <li><a href="/members">\u4f1a\u5458\u4e13\u533a</a></li>\r\n\t\t\t <li><a href="/research">\u7814\u7a76\u5e94\u7528</a></li>\r\n\t\t\t <li><a href="/training">\u6559\u80b2\u57f9\u8bad</a></li>\r\n\t\t\t <li><a href="http://bbs.ccose.org">\u4e92\u52a8\u793e\u533a</a></li>\r\n\t\t\t <li><a href="/about">\u5173\u4e8e</a></li>\r\n\r\n\r\n\r\n\t\t</ul>\r\n </div>\r\n <div class="clr"></div>\r\n </div>\r\n </div>\r\n \t<!-- divide bar -->\r\n\t<div style="width:950px;height:10px;clear:both;"></div>\r\n\r\n', u'\r\n\r\n\r\n\t<!-- main content -->\r\n\t<div class="content">\r\n\t\t<div class="content_resize">\r\n\r\n\t\t\t<div class="mainbar">\r\n\t\t\t\t\t'] |
self | [<Text Node: '<!DOCTYPE HTML PUBLIC "-/'>, <Block Node: title. Contents: [<Text Node: ' CCOSE - ??????????? '>]>, <Text Node: '</title> <meta http-'>, <django.template.loader_tags.ConstantIncludeNode object at 0x7f4eae0145d0>, <Text Node: ' <!-- main content '>, <Block Node: main_content. Contents: [<Text Node: ' '>]>, <Text Node: ' '>, <Block Node: main_content_feedback. Contents: [<Text Node: ' '>]>, <Text Node: ' '>, <django.template.loader_tags.ConstantIncludeNode object at 0x7f4eae014b50>, <Text Node: ' </div> </div> '>, <django.template.loader_tags.ConstantIncludeNode object at 0x7f4eae014050>, <Text Node: ' </body> </html> '>] |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/base.py
in render_node
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
return nodes
def render_node(self, node, context):
return node.render(context)...
class TextNode(Node):
def __init__(self, s):
self.s = s
def __repr__(self):
Variable | Value |
---|---|
node | <Block Node: main_content. Contents: [<Text Node: ' '>]> |
self | [<Text Node: '<!DOCTYPE HTML PUBLIC "-/'>, <Block Node: title. Contents: [<Text Node: ' CCOSE - ??????????? '>]>, <Text Node: '</title> <meta http-'>, <django.template.loader_tags.ConstantIncludeNode object at 0x7f4eae0145d0>, <Text Node: ' <!-- main content '>, <Block Node: main_content. Contents: [<Text Node: ' '>]>, <Text Node: ' '>, <Block Node: main_content_feedback. Contents: [<Text Node: ' '>]>, <Text Node: ' '>, <django.template.loader_tags.ConstantIncludeNode object at 0x7f4eae014b50>, <Text Node: ' </div> </div> '>, <django.template.loader_tags.ConstantIncludeNode object at 0x7f4eae014050>, <Text Node: ' </body> </html> '>] |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/loader_tags.py
in render
push = block = block_context.pop(self.name)
if block is None:
block = self
# Create new block so we can store context without thread-safety issues.
block = BlockNode(block.name, block.nodelist)
block.context = context
context['block'] = block
result = block.nodelist.render(context)...
if push is not None:
block_context.push(self.name, push)
context.pop()
return result
def super(self):
Variable | Value |
---|---|
push | <Block Node: main_content. Contents: [<Text Node: ' <div class="a'>, <For Node: for article in list, tail_len: 9>, <Text Node: ' </div'>]> |
block_context | <django.template.loader_tags.BlockContext object at 0x7f4eadff37d0> |
context | Error in formatting: no such table: articles_article |
block | <Block Node: main_content. Contents: [<Text Node: ' <div class="a'>, <For Node: for article in list, tail_len: 9>, <Text Node: ' </div'>]> |
self | <Block Node: main_content. Contents: [<Text Node: ' '>]> |
/usr/lib/python2.7/site-packages/django/template/base.py
in render
# extend_nodelist().
contains_nontext = False
def render(self, context):
bits = []
for node in self:
if isinstance(node, Node):
bit = self.render_node(node, context)...
else:
bit = node
bits.append(force_unicode(bit))
return mark_safe(u''.join(bits))
def get_nodes_by_type(self, nodetype):
Variable | Value |
---|---|
node | <For Node: for article in list, tail_len: 9> |
bit | u'\r\n\r\n <div class="article">\r\n\r\n <h3>\u60a8\u7684\u4f4d\u7f6e\uff1a<a href="/">\u9996\u9875</a> > <a href="/research/">\u7814\u7a76\u5e94\u7528 </a></h3>\r\n <h2>\u7814\u7a76\u5e94\u7528</h2>\r\n\r\n \r\n\t\t\t' |
bits | [u'\r\n\r\n <div class="article">\r\n\r\n <h3>\u60a8\u7684\u4f4d\u7f6e\uff1a<a href="/">\u9996\u9875</a> > <a href="/research/">\u7814\u7a76\u5e94\u7528 </a></h3>\r\n <h2>\u7814\u7a76\u5e94\u7528</h2>\r\n\r\n \r\n\t\t\t'] |
self | [<Text Node: ' <div class="a'>, <For Node: for article in list, tail_len: 9>, <Text Node: ' </div'>] |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/base.py
in render_node
"Return a list of all nodes of the given type"
nodes = []
for node in self:
nodes.extend(node.get_nodes_by_type(nodetype))
return nodes
def render_node(self, node, context):
return node.render(context)...
class TextNode(Node):
def __init__(self, s):
self.s = s
def __repr__(self):
Variable | Value |
---|---|
node | <For Node: for article in list, tail_len: 9> |
self | [<Text Node: ' <div class="a'>, <For Node: for article in list, tail_len: 9>, <Text Node: ' </div'>] |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/template/defaulttags.py
in render
values = self.sequence.resolve(context, True)
except VariableDoesNotExist:
values = []
if values is None:
values = []
if not hasattr(values, '__len__'):
values = list(values)
len_values = len(values)...
if len_values < 1:
context.pop()
return self.nodelist_empty.render(context)
nodelist = NodeList()
if self.is_reversed:
values = reversed(values)
Variable | Value |
---|---|
parentloop | {} |
self | <For Node: for article in list, tail_len: 9> |
values | Error in formatting: no such table: articles_article |
context | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/db/models/query.py
in __len__
# Since __len__ is called quite frequently (for example, as part of
# list(qs), we make some effort here to be as efficient as possible
# whilst not messing up any existing iterators against the QuerySet.
if self._result_cache is None:
if self._iter:
self._result_cache = list(self._iter)
else:
self._result_cache = list(self.iterator())...
elif self._iter:
self._result_cache.extend(self._iter)
if self._prefetch_related_lookups and not self._prefetch_done:
self._prefetch_related_objects()
return len(self._result_cache)
Variable | Value |
---|---|
self | Error in formatting: no such table: articles_article |
/usr/lib/python2.7/site-packages/django/db/models/query.py
in iterator
# Cache db and model outside the loop
db = self.db
model = self.model
compiler = self.query.get_compiler(using=db)
if fill_cache:
klass_info = get_klass_info(model, max_depth=max_depth,
requested=requested, only_load=only_load)
for row in compiler.results_iter():...
if fill_cache:
obj, _ = get_cached_row(row, index_start, db, klass_info,
offset=len(aggregate_select))
else:
if skip:
row_data = row[index_start:aggregate_start]
Variable | Value |
---|---|
requested | None |
fill_cache | False |
aggregate_select | [] |
fields | [<django.db.models.fields.AutoField: id>, <django.db.models.fields.related.ForeignKey: category>, <django.db.models.fields.CharField: editor>, <django.db.models.fields.CharField: title>, <django.db.models.fields.TextField: content>, <django.db.models.fields.DateTimeField: publishDate>, <django.db.models.fields.CharField: tags>, <django.db.models.fields.CharField: author>, <django.db.models.fields.CharField: source>] |
skip | None |
self | Error in formatting: no such table: articles_article |
load_fields | [] |
db | 'default' |
index_start | 0 |
extra_select | [] |
aggregate_start | 9 |
model | <class 'articles.models.Article'> |
only_load | {} |
max_depth | 5 |
compiler | <django.db.models.sql.compiler.SQLCompiler object at 0x7f4eae014610> |
/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py
in results_iter
fields = None
has_aggregate_select = bool(self.query.aggregate_select)
# Set transaction dirty if we're using SELECT FOR UPDATE to ensure
# a subsequent commit/rollback is executed, so any database locks
# are released.
if self.query.select_for_update and transaction.is_managed(self.using):
transaction.set_dirty(self.using)
for rows in self.execute_sql(MULTI):...
for row in rows:
if resolve_columns:
if fields is None:
# We only set this up here because
# related_select_fields isn't populated until
# execute_sql() has been called.
Variable | Value |
---|---|
fields | None |
self | <django.db.models.sql.compiler.SQLCompiler object at 0x7f4eae014610> |
has_aggregate_select | False |
resolve_columns | False |
/usr/lib/python2.7/site-packages/django/db/models/sql/compiler.py
in execute_sql
except EmptyResultSet:
if result_type == MULTI:
return empty_iter()
else:
return
cursor = self.connection.cursor()
cursor.execute(sql, params)...
if not result_type:
return cursor
if result_type == SINGLE:
if self.query.ordering_aliases:
return cursor.fetchone()[:-len(self.query.ordering_aliases)]
Variable | Value |
---|---|
cursor | <django.db.backends.util.CursorDebugWrapper object at 0x7f4eadf6a110> |
self | <django.db.models.sql.compiler.SQLCompiler object at 0x7f4eae014610> |
params | () |
result_type | 'multi' |
sql | 'SELECT "articles_article"."id", "articles_article"."category_id", "articles_article"."editor", "articles_article"."title", "articles_article"."content", "articles_article"."publishDate", "articles_article"."tags", "articles_article"."author", "articles_article"."source" FROM "articles_article" INNER JOIN "articles_category" ON ("articles_article"."category_id" = "articles_category"."id") ORDER BY "articles_category"."ctgrName" ASC, "articles_category"."parentCtgr" ASC, "articles_article"."title" ASC, "articles_article"."editor" ASC' |
/usr/lib/python2.7/site-packages/django/db/backends/util.py
in execute
class CursorDebugWrapper(CursorWrapper):
def execute(self, sql, params=()):
self.set_dirty()
start = time()
try:
return self.cursor.execute(sql, params)...
finally:
stop = time()
duration = stop - start
sql = self.db.ops.last_executed_query(self.cursor, sql, params)
self.db.queries.append({
'sql': sql,
Variable | Value |
---|---|
self | <django.db.backends.util.CursorDebugWrapper object at 0x7f4eadf6a110> |
stop | 1711718799.206655 |
start | 1711718799.206498 |
params | () |
sql | u'SELECT "articles_article"."id", "articles_article"."category_id", "articles_article"."editor", "articles_article"."title", "articles_article"."content", "articles_article"."publishDate", "articles_article"."tags", "articles_article"."author", "articles_article"."source" FROM "articles_article" INNER JOIN "articles_category" ON ("articles_article"."category_id" = "articles_category"."id") ORDER BY "articles_category"."ctgrName" ASC, "articles_category"."parentCtgr" ASC, "articles_article"."title" ASC, "articles_article"."editor" ASC' |
duration | 0.0001571178436279297 |
/usr/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py
in execute
Django uses "format" style placeholders, but pysqlite2 uses "qmark" style.
This fixes it -- but note that if you want to use a literal "%s" in a query,
you'll need to use "%%s".
"""
def execute(self, query, params=()):
query = self.convert_query(query)
try:
return Database.Cursor.execute(self, query, params)...
except Database.IntegrityError, e:
raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
except Database.DatabaseError, e:
raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
def executemany(self, query, param_list):
Variable | Value |
---|---|
params | () |
self | <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x7f4eade3ddf8> |
e | OperationalError('no such table: articles_article',) |
query | 'SELECT "articles_article"."id", "articles_article"."category_id", "articles_article"."editor", "articles_article"."title", "articles_article"."content", "articles_article"."publishDate", "articles_article"."tags", "articles_article"."author", "articles_article"."source" FROM "articles_article" INNER JOIN "articles_category" ON ("articles_article"."category_id" = "articles_category"."id") ORDER BY "articles_category"."ctgrName" ASC, "articles_category"."parentCtgr" ASC, "articles_article"."title" ASC, "articles_article"."editor" ASC' |
No GET data
No POST data
No FILES data
No cookie data
Variable | Value |
---|---|
mod_wsgi.listener_port | '80' |
HTTP_REFERER | 'http://bbs.ccose.org/research' |
CONTEXT_DOCUMENT_ROOT | '/home/mycode/ccose_deploy/ccose/' |
SERVER_SOFTWARE | 'Apache/2.4.6 (CentOS) PHP/7.0.32 mod_wsgi/3.4 Python/2.7.5' |
SCRIPT_NAME | u'' |
mod_wsgi.enable_sendfile | '0' |
mod_wsgi.handler_script | '' |
SERVER_SIGNATURE | '' |
REQUEST_METHOD | 'GET' |
PATH_INFO | u'/research/' |
SERVER_PROTOCOL | 'HTTP/1.1' |
QUERY_STRING | '' |
HTTP_USER_AGENT | 'claudebot' |
SERVER_NAME | 'bbs.ccose.org' |
REMOTE_ADDR | '3.236.57.1' |
mod_wsgi.queue_start | '1711718799203065' |
mod_wsgi.request_handler | 'wsgi-script' |
wsgi.url_scheme | 'http' |
PATH_TRANSLATED | '/home/mycode/ccose_deploy/ccose/ccose/wsgi.py/research/' |
SERVER_PORT | '80' |
wsgi.multiprocess | True |
mod_wsgi.input_chunked | '0' |
SERVER_ADDR | '192.168.122.253' |
DOCUMENT_ROOT | '/home/mycode/ccose_deploy/ccose/' |
mod_wsgi.process_group | '' |
SCRIPT_FILENAME | '/home/mycode/ccose_deploy/ccose/ccose/wsgi.py' |
SERVER_ADMIN | 'wenyuejie@126.com' |
wsgi.input | <mod_wsgi.Input object at 0x7f4eadff3170> |
HTTP_HOST | 'bbs.ccose.org' |
CONTEXT_PREFIX | '' |
wsgi.multithread | False |
mod_wsgi.callable_object | 'application' |
REQUEST_URI | '/research/' |
HTTP_ACCEPT | '*/*' |
wsgi.version | (1, 0) |
GATEWAY_INTERFACE | 'CGI/1.1' |
wsgi.run_once | False |
wsgi.errors | <mod_wsgi.Log object at 0x7f4eadff30b0> |
REMOTE_PORT | '42684' |
mod_wsgi.listener_host | '' |
REQUEST_SCHEME | 'http' |
mod_wsgi.version | (3, 4) |
mod_wsgi.application_group | 'www.ccose.org|' |
mod_wsgi.script_reloading | '1' |
wsgi.file_wrapper | '' |
UNIQUE_ID | 'ZgbBj@0cuk57lAz0lcAeEAAAAAA' |
ccose.settings
Setting | Value |
---|---|
USE_L10N | True |
USE_THOUSAND_SEPARATOR | False |
CSRF_COOKIE_SECURE | False |
LANGUAGE_CODE | 'zh_CN' |
ROOT_URLCONF | 'ccose.urls' |
MANAGERS | () |
DEFAULT_CHARSET | 'utf-8' |
STATIC_ROOT | '/home/mycode/ccose_deploy/ccose/static' |
ALLOWED_HOSTS | [] |
MESSAGE_STORAGE | 'django.contrib.messages.storage.fallback.FallbackStorage' |
EMAIL_SUBJECT_PREFIX | '[Django] ' |
FILE_UPLOAD_PERMISSIONS | None |
URL_VALIDATOR_USER_AGENT | 'Django/1.4.22 (https://www.djangoproject.com)' |
STATICFILES_FINDERS | ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder') |
SESSION_COOKIE_DOMAIN | None |
SESSION_COOKIE_NAME | 'sessionid' |
ADMIN_FOR | () |
TIME_INPUT_FORMATS | ('%H:%M:%S', '%H:%M') |
DATABASES | {'default': {'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': '/home/mycode/ccose_deploy/ccose/ccose.db', 'OPTIONS': {}, 'PASSWORD': u'********************', 'PORT': '', 'TEST_CHARSET': None, 'TEST_COLLATION': None, 'TEST_MIRROR': None, 'TEST_NAME': None, 'TIME_ZONE': 'UTC', 'USER': ''}} |
SERVER_EMAIL | 'root@localhost' |
FILE_UPLOAD_HANDLERS | ('django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler') |
DEFAULT_CONTENT_TYPE | 'text/html' |
APPEND_SLASH | True |
FIRST_DAY_OF_WEEK | 0 |
DATABASE_ROUTERS | [] |
YEAR_MONTH_FORMAT | 'F Y' |
STATICFILES_STORAGE | 'django.contrib.staticfiles.storage.StaticFilesStorage' |
CACHES | {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'LOCATION': ''}} |
SESSION_COOKIE_PATH | '/' |
USE_X_FORWARDED_HOST | False |
MIDDLEWARE_CLASSES | ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') |
USE_I18N | True |
THOUSAND_SEPARATOR | ',' |
SECRET_KEY | u'********************' |
LANGUAGE_COOKIE_NAME | 'django_language' |
DEFAULT_INDEX_TABLESPACE | '' |
TRANSACTIONS_MANAGED | False |
LOGGING_CONFIG | 'django.utils.log.dictConfig' |
SEND_BROKEN_LINK_EMAILS | False |
TEMPLATE_LOADERS | ('django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader') |
WSGI_APPLICATION | 'ccose.wsgi.application' |
TEMPLATE_DEBUG | False |
X_FRAME_OPTIONS | 'SAMEORIGIN' |
AUTHENTICATION_BACKENDS | ('django.contrib.auth.backends.ModelBackend',) |
FORCE_SCRIPT_NAME | None |
CACHE_BACKEND | 'locmem://' |
SIGNING_BACKEND | 'django.core.signing.TimestampSigner' |
SESSION_COOKIE_SECURE | False |
CSRF_COOKIE_DOMAIN | None |
FILE_CHARSET | 'utf-8' |
DEBUG | True |
SESSION_FILE_PATH | None |
DEFAULT_FILE_STORAGE | 'django.core.files.storage.FileSystemStorage' |
INSTALLED_APPS | ('django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'articles', 'notices', 'registration', 'kindeditor', 'django.contrib.admin') |
LANGUAGES | (('ar', 'Arabic'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('bn', 'Bengali'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('el', 'Greek'), ('en', 'English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy-nl', 'Frisian'), ('ga', 'Irish'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hu', 'Hungarian'), ('id', 'Indonesian'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('nb', 'Norwegian Bokmal'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('th', 'Thai'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('vi', 'Vietnamese'), ('zh-cn', 'Simplified Chinese'), ('zh-tw', 'Traditional Chinese')) |
COMMENTS_ALLOW_PROFANITIES | False |
STATICFILES_DIRS | (('css', '/home/mycode/ccose_deploy/ccose/static/css'), ('js', '/home/mycode/ccose_deploy/ccose/static/js'), ('images', '/home/mycode/ccose_deploy/ccose/static/images')) |
PREPEND_WWW | False |
SECURE_PROXY_SSL_HEADER | None |
SESSION_COOKIE_HTTPONLY | True |
DEBUG_PROPAGATE_EXCEPTIONS | False |
MONTH_DAY_FORMAT | 'F j' |
LOGIN_URL | '/accounts/login/' |
SESSION_EXPIRE_AT_BROWSER_CLOSE | False |
TIME_FORMAT | 'P' |
DATE_INPUT_FORMATS | ('%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y') |
CSRF_COOKIE_NAME | 'csrftoken' |
EMAIL_HOST_PASSWORD | u'********************' |
PASSWORD_RESET_TIMEOUT_DAYS | u'********************' |
CACHE_MIDDLEWARE_ALIAS | 'default' |
SESSION_SAVE_EVERY_REQUEST | False |
NUMBER_GROUPING | 0 |
SESSION_ENGINE | 'django.contrib.sessions.backends.db' |
CSRF_FAILURE_VIEW | 'django.views.csrf.csrf_failure' |
CSRF_COOKIE_PATH | '/' |
LOGIN_REDIRECT_URL | '/accounts/profile/' |
LOGGING | {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django.request': {'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': True}}, 'version': 1} |
IGNORABLE_404_URLS | () |
LOCALE_PATHS | () |
HERE | '/home/mycode/ccose_deploy/ccose/ccose' |
LOGOUT_URL | '/accounts/logout/' |
EMAIL_USE_TLS | False |
FIXTURE_DIRS | () |
EMAIL_HOST | 'localhost' |
DATE_FORMAT | 'N j, Y' |
MEDIA_ROOT | '/home/mycode/ccose_deploy/ccose/media' |
DEFAULT_EXCEPTION_REPORTER_FILTER | 'django.views.debug.SafeExceptionReporterFilter' |
ADMINS | () |
FORMAT_MODULE_PATH | None |
DEFAULT_FROM_EMAIL | 'webmaster@localhost' |
MEDIA_URL | '/media/' |
DATETIME_FORMAT | 'N j, Y, P' |
TEMPLATE_DIRS | () |
SITE_ID | 1 |
DISALLOWED_USER_AGENTS | () |
ALLOWED_INCLUDE_ROOTS | () |
DECIMAL_SEPARATOR | '.' |
SHORT_DATE_FORMAT | 'm/d/Y' |
TEST_RUNNER | 'django.test.simple.DjangoTestSuiteRunner' |
CACHE_MIDDLEWARE_KEY_PREFIX | u'********************' |
TIME_ZONE | 'Asia/Shanghai' |
FILE_UPLOAD_MAX_MEMORY_SIZE | 2621440 |
EMAIL_BACKEND | 'django.core.mail.backends.smtp.EmailBackend' |
DEFAULT_TABLESPACE | '' |
TEMPLATE_CONTEXT_PROCESSORS | ('django.contrib.auth.context_processors.auth', 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', 'django.core.context_processors.static', 'django.core.context_processors.tz', 'django.contrib.messages.context_processors.messages') |
SESSION_COOKIE_AGE | 1209600 |
SETTINGS_MODULE | 'ccose.settings' |
USE_ETAGS | False |
LANGUAGES_BIDI | ('he', 'ar', 'fa') |
FILE_UPLOAD_TEMP_DIR | None |
INTERNAL_IPS | () |
STATIC_URL | '/static/' |
EMAIL_PORT | 25 |
USE_TZ | True |
SHORT_DATETIME_FORMAT | 'm/d/Y P' |
PASSWORD_HASHERS | u'********************' |
ABSOLUTE_URL_OVERRIDES | {} |
CACHE_MIDDLEWARE_SECONDS | 600 |
TEMPLATE_STRING_IF_INVALID | '' |
DATETIME_INPUT_FORMATS | ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y') |
EMAIL_HOST_USER | '' |
PROFANITIES_LIST | u'********************' |
You're seeing this error because you have DEBUG = True
in your
Django settings file. Change that to False
, and Django will
display a standard 500 page.