<class 'django.template.TemplateSyntaxError'>
Python 2.5.5: /usr/bin/python2.5
Wed Feb 8 08:27:45 2012

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /home/th29622/public_html/fcgi.py in run(self=<fcgi.Request object at 0xb7ea1aac>)
  578         """Runs the handler, flushes the streams, and ends the request."""
  579         try:
  580             protocolStatus, appStatus = self.server.handler(self)
  581         except:
  582             traceback.print_exc(file=self.stderr)
protocolStatus undefined, appStatus undefined, self = <fcgi.Request object at 0xb7ea1aac>, self.server = <fcgi.WSGIServer object at 0xb7e9a8ac>, self.server.handler = <bound method WSGIServer.handler of <fcgi.WSGIServer object at 0xb7e9a8ac>>
 /home/th29622/public_html/fcgi.py in handler(self=<fcgi.WSGIServer object at 0xb7e9a8ac>, req=<fcgi.Request object at 0xb7ea1aac>)
 1264         try:
 1265             try:
 1266                 result = self.application(environ, start_response)
 1267                 try:
 1268                     for data in result:
result = None, self = <fcgi.WSGIServer object at 0xb7e9a8ac>, self.application = <django.core.handlers.wsgi.WSGIHandler object at 0xb7e9a84c>, environ = {'DOCUMENT_ROOT': '/home/th29622/public_html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.dirtriot.com.br', 'HTTP_PRAGMA': 'no-cache', ...}, start_response = <function start_response at 0xb7e9fd84>
 /usr/local/lib/python2.5/site-packages/django/core/handlers/wsgi.py in __call__(self=<django.core.handlers.wsgi.WSGIHandler object at 0xb7e9a84c>, environ={'DOCUMENT_ROOT': '/home/th29622/public_html', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.dirtriot.com.br', 'HTTP_PRAGMA': 'no-cache', ...}, start_response=<function start_response at 0xb7e9fd84>)
  241                 # Apply response middleware
  242                 for middleware_method in self._response_middleware:
  243                     response = middleware_method(request, response)
  244                 response = self.apply_response_fixes(request, response)
  245         finally:
response = <django.http.HttpResponseNotFound object at 0x98c5dcc>, middleware_method = <bound method FlatpageFallbackMiddleware.process....FlatpageFallbackMiddleware object at 0x94888ec>>, request = <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>
 /usr/local/lib/python2.5/site-packages/django/contrib/flatpages/middleware.py in process_response(self=<django.contrib.flatpages.middleware.FlatpageFallbackMiddleware object at 0x94888ec>, request=<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, response=<django.http.HttpResponseNotFound object at 0x98c5dcc>)
    8             return response # No need to check for a flatpage for non-404 responses.
    9         try:
   10             return flatpage(request, request.path_info)
   11         # Return the original response if any errors happened. Because this
   12         # is a middleware, we can't assume the errors will be caught elsewhere.
global flatpage = <function flatpage at 0x967d80c>, request = <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, request.path_info = u'/equipe/pilotos-shows/'
 /usr/local/lib/python2.5/site-packages/django/contrib/flatpages/views.py in flatpage(request=<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, url=u'/equipe/pilotos-shows/')
   44         'flatpage': f,
   45     })
   46     response = HttpResponse(t.render(c))
   47     populate_xheaders(request, response, FlatPage, f.id)
   48     return response
response undefined, global HttpResponse = <class 'django.http.HttpResponse'>, t = <django.template.Template object at 0x98c57ac>, t.render = <bound method Template.render of <django.template.Template object at 0x98c57ac>>, c = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/__init__.py in render(self=<django.template.Template object at 0x98c57ac>, context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
  174     def render(self, context):
  175         "Display stage -- can be called many times"
  176         return self.nodelist.render(context)
  177 
  178 def compile_string(template_string, origin):
self = <django.template.Template object at 0x98c57ac>, self.nodelist = [<ExtendsNode: extends "base.html">], self.nodelist.render = <bound method DebugNodeList.render of [<ExtendsNode: extends "base.html">]>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/__init__.py in render(self=[<ExtendsNode: extends "base.html">], context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
  766         for node in self:
  767             if isinstance(node, Node):
  768                 bits.append(self.render_node(node, context))
  769             else:
  770                 bits.append(node)
bits = [], bits.append = <built-in method append of list object at 0x98c5eac>, self = [<ExtendsNode: extends "base.html">], self.render_node = <bound method DebugNodeList.render_node of [<ExtendsNode: extends "base.html">]>, node = <ExtendsNode: extends "base.html">, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/debug.py in render_node(self=[<ExtendsNode: extends "base.html">], node=<ExtendsNode: extends "base.html">, context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
   69     def render_node(self, node, context):
   70         try:
   71             result = node.render(context)
   72         except TemplateSyntaxError, e:
   73             if not hasattr(e, 'source'):
result undefined, node = <ExtendsNode: extends "base.html">, node.render = <bound method ExtendsNode.render of <ExtendsNode: extends "base.html">>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/loader_tags.py in render(self=<ExtendsNode: extends "base.html">, context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
   95                 parent_block.add_parent(parent_block.nodelist)
   96                 parent_block.nodelist = block_node.nodelist
   97         return compiled_parent.render(context)
   98 
   99 class ConstantIncludeNode(Node):
compiled_parent = <django.template.Template object at 0x991022c>, compiled_parent.render = <bound method Template.render of <django.template.Template object at 0x991022c>>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/__init__.py in render(self=<django.template.Template object at 0x991022c>, context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
  174     def render(self, context):
  175         "Display stage -- can be called many times"
  176         return self.nodelist.render(context)
  177 
  178 def compile_string(template_string, origin):
self = <django.template.Template object at 0x991022c>, self.nodelist = [<Text Node: '<?xml version="1.0" encod'>, <djan...185ec>, <Text Node: ' Diego L. Jarschel.</p> '>], self.nodelist.render = <bound method DebugNodeList.render of [<Text Nod...85ec>, <Text Node: ' Diego L. Jarschel.</p> '>]>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/__init__.py in render(self=[<Text Node: '<?xml version="1.0" encod'>, <djan...185ec>, <Text Node: ' Diego L. Jarschel.</p> '>], context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
  766         for node in self:
  767             if isinstance(node, Node):
  768                 bits.append(self.render_node(node, context))
  769             else:
  770                 bits.append(node)
bits = [u'<?xml version="1.0" encoding="UTF-8" ?>\n', '', u'\n', '', u'\n', '', u'\n', '', u'\n<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tr...content="Eccoweb Consultoria e Solu\xe7\xf5es Web" />\n\t', u'\n\t<meta name="description" content="Allisson...a name="robots" content="noindex, nofollow" />\n', u'\n\t<title>', u'Pilotos de Shows Dirt Riot Freestyle Wear: Dirt Riot', u'</title>\n <link type="application/rss+xml...rnate" title="RSS 2.0" href="/rss/noticias/" />\n\t', u'\n\t<link type="text/css" media="screen" rel="stylesheet" href="/media/css/styles.css" />\n\t', u'\n\t\n\t', u'\n\t<script type="text/javascript">\n\t\tvar g...script" src="/media/js/scripts.js"></script>\n\t', u'\n ', u'\n \n\t \n \n ', u'\n '], bits.append = <built-in method append of list object at 0x98be50c>, self = [<Text Node: '<?xml version="1.0" encod'>, <djan...185ec>, <Text Node: ' Diego L. Jarschel.</p> '>], self.render_node = <bound method DebugNodeList.render_node of [<Tex...85ec>, <Text Node: ' Diego L. Jarschel.</p> '>]>, node = <WithNode>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/debug.py in render_node(self=[<Text Node: '<?xml version="1.0" encod'>, <djan...185ec>, <Text Node: ' Diego L. Jarschel.</p> '>], node=<WithNode>, context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
   69     def render_node(self, node, context):
   70         try:
   71             result = node.render(context)
   72         except TemplateSyntaxError, e:
   73             if not hasattr(e, 'source'):
result undefined, node = <WithNode>, node.render = <bound method WithNode.render of <WithNode>>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/defaulttags.py in render(self=<WithNode>, context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
  420         context.push()
  421         context[self.name] = val
  422         output = self.nodelist.render(context)
  423         context.pop()
  424         return output
output undefined, self = <WithNode>, self.nodelist = [<Text Node: ' </head> <body> <div id='>, <djan...15b4c>, <Text Node: '</a></li> </ul> </di'>], self.nodelist.render = <bound method DebugNodeList.render of [<Text Nod...5b4c>, <Text Node: '</a></li> </ul> </di'>]>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/__init__.py in render(self=[<Text Node: ' </head> <body> <div id='>, <djan...15b4c>, <Text Node: '</a></li> </ul> </di'>], context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
  766         for node in self:
  767             if isinstance(node, Node):
  768                 bits.append(self.render_node(node, context))
  769             else:
  770                 bits.append(node)
bits = [u'\n</head>\n<body>\n\t<div id="base">\n\t\t<div id="head...l class="hidden">\n\t\t\t\t<li><a href="#menu" title="', u'Pular para o menu de navega\xe7\xe3o', u'">', u'Pular para o menu de navega\xe7\xe3o', u'</a></li>\n\t\t\t\t<li><a href="#body" title="', u'Pular para o conte\xfado', u'">', u'Pular para o conte\xfado', u'</a></li>\n\t\t\t</ul>\n\t\t\t', u'<p class="hidden">Dirt Riot</p>', u'\n\t\t\t<p class="hidden"><a href="http://www.dirtri...<a href="mailto:dirtriot@dirtriot.com.br" title="', u'Entre em contato com a equipe Dirt Riot', u'">dirtriot@dirtriot.com.br</a></p>\n\t\t\t<ul id="me...</a></li>\t\t\t\t\n\t\t\t\t<li><a href="/eventos/agenda/">', u'Agenda', u'</a></li>\n\t\t\t\t<li><a href="#nogo" rel="nofollow">', u'Loja Virtual', u'</a>\n\t\t\t\t\t<ul', '', u'>\n\t\t\t\t\t\t'], bits.append = <built-in method append of list object at 0x989fc6c>, self = [<Text Node: ' </head> <body> <div id='>, <djan...15b4c>, <Text Node: '</a></li> </ul> </di'>], self.render_node = <bound method DebugNodeList.render_node of [<Tex...5b4c>, <Text Node: '</a></li> </ul> </di'>]>, node = <django.template.InclusionNode object at 0x9918eac>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/debug.py in render_node(self=[<Text Node: ' </head> <body> <div id='>, <djan...15b4c>, <Text Node: '</a></li> </ul> </di'>], node=<django.template.InclusionNode object at 0x9918eac>, context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
   69     def render_node(self, node, context):
   70         try:
   71             result = node.render(context)
   72         except TemplateSyntaxError, e:
   73             if not hasattr(e, 'source'):
result undefined, node = <django.template.InclusionNode object at 0x9918eac>, node.render = <bound method InclusionNode.render of <django.template.InclusionNode object at 0x9918eac>>, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}]
 /usr/local/lib/python2.5/site-packages/django/template/__init__.py in render(self=<django.template.InclusionNode object at 0x9918eac>, context=[{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}])
  923                         self.nodelist = t.nodelist
  924                     return self.nodelist.render(context_class(dict,
  925                             autoescape=context.autoescape))
  926 
  927             compile_func = curry(generic_tag_compiler, params, defaults, getattr(func, "_decorated_function", func).__name__, InclusionNode)
autoescape undefined, context = [{u'ie': 'mmon'}, {'request': <WSGIRequest GET:<.../ -- Pilotos de Shows Dirt Riot Freestyle Wear>}], context.autoescape = True
 /usr/local/lib/python2.5/site-packages/django/template/__init__.py in render(self=[<django.template.defaulttags.LoadNode object at..., <Text Node: ' '>, <If node>, <Text Node: ' '>], context=[{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}])
  766         for node in self:
  767             if isinstance(node, Node):
  768                 bits.append(self.render_node(node, context))
  769             else:
  770                 bits.append(node)
bits = ['', u'\n\n'], bits.append = <built-in method append of list object at 0x99152ac>, self = [<django.template.defaulttags.LoadNode object at..., <Text Node: ' '>, <If node>, <Text Node: ' '>], self.render_node = <bound method DebugNodeList.render_node of [<dja... <Text Node: ' '>, <If node>, <Text Node: ' '>]>, node = <If node>, context = [{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}]
 /usr/local/lib/python2.5/site-packages/django/template/debug.py in render_node(self=[<django.template.defaulttags.LoadNode object at..., <Text Node: ' '>, <If node>, <Text Node: ' '>], node=<If node>, context=[{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}])
   69     def render_node(self, node, context):
   70         try:
   71             result = node.render(context)
   72         except TemplateSyntaxError, e:
   73             if not hasattr(e, 'source'):
result undefined, node = <If node>, node.render = <bound method IfNode.render of <If node>>, context = [{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}]
 /usr/local/lib/python2.5/site-packages/django/template/defaulttags.py in render(self=<If node>, context=[{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}])
  243                     value = None
  244                 if (value and not ifnot) or (ifnot and not value):
  245                     return self.nodelist_true.render(context)
  246             return self.nodelist_false.render(context)
  247         else:
self = <If node>, self.nodelist_true = [<Text Node: ' '>, <For Node: for i in categorias, tail_len: 7>, <Text Node: ' '>], self.nodelist_true.render = <bound method DebugNodeList.render of [<Text Nod...i in categorias, tail_len: 7>, <Text Node: ' '>]>, context = [{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}]
 /usr/local/lib/python2.5/site-packages/django/template/__init__.py in render(self=[<Text Node: ' '>, <For Node: for i in categorias, tail_len: 7>, <Text Node: ' '>], context=[{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}])
  766         for node in self:
  767             if isinstance(node, Node):
  768                 bits.append(self.render_node(node, context))
  769             else:
  770                 bits.append(node)
bits = [u'\n '], bits.append = <built-in method append of list object at 0x991320c>, self = [<Text Node: ' '>, <For Node: for i in categorias, tail_len: 7>, <Text Node: ' '>], self.render_node = <bound method DebugNodeList.render_node of [<Tex...i in categorias, tail_len: 7>, <Text Node: ' '>]>, node = <For Node: for i in categorias, tail_len: 7>, context = [{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}]
 /usr/local/lib/python2.5/site-packages/django/template/debug.py in render_node(self=[<Text Node: ' '>, <For Node: for i in categorias, tail_len: 7>, <Text Node: ' '>], node=<For Node: for i in categorias, tail_len: 7>, context=[{'forloop': {'revcounter0': 6, 'last': False, '...egoria: Motocicletas e Peças (Classificados)>]}])
   79             wrapped.source = node.source
   80             wrapped.exc_info = exc_info()
   81             raise wrapped
   82         return result
   83 
wrapped = TemplateSyntaxError(u'Caught an exception while rendering: list index out of range',)

<class 'django.template.TemplateSyntaxError'>: Caught an exception while rendering: list index out of range Original Traceback (most recent call last): File "/usr/local/lib/python2.5/site-packages/django/template/debug.py", line 71, in render_node result = node.render(context) File "/usr/local/lib/python2.5/site-packages/django/template/defaulttags.py", line 148, in render nodelist.append(node.render(context)) File "/usr/local/lib/python2.5/site-packages/django/template/debug.py", line 87, in render output = force_unicode(self.filter_expression.resolve(context)) File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py", line 535, in resolve obj = self.var.resolve(context) File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py", line 676, in resolve value = self._resolve_lookup(context) File "/usr/local/lib/python2.5/site-packages/django/template/__init__.py", line 711, in _resolve_lookup current = current() File "/usr/local/lib/python2.5/site-packages/django/utils/functional.py", line 55, in _curried return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs)) File "/usr/local/lib/python2.5/site-packages/django/db/models/base.py", line 511, in get_absolute_url return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self, *args, **kwargs) File "/home/th29622/django_projects/meuprojeto/loja_virtual/models.py", line 21, in get_absolute_url return reverse('loja_virtual.views.produtos', kwargs={'slug': self.slug}) File "/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py", line 252, in reverse *args, **kwargs))) File "/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py", line 226, in reverse possibilities, pattern = self.reverse_dict.get(lookup_view, [(), ()]) File "/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py", line 160, in _get_reverse_dict for name, (matches, pat) in pattern.reverse_dict.iteritems(): File "/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py", line 153, in _get_reverse_dict if not self._reverse_dict and hasattr(self.urlconf_module, 'urlpatterns'): File "/usr/local/lib/python2.5/site-packages/django/core/urlresolvers.py", line 197, in _get_urlconf_module self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) File "/home/th29622/django_projects/meuprojeto/eventos/urls.py", line 11, in <module> 'month': Evento.agenda.all()[:1][0].data.month, File "/usr/local/lib/python2.5/site-packages/django/db/models/query.py", line 232, in __getitem__ return list(qs)[0] IndexError: list index out of range
      args = (u'Caught an exception while rendering: list index out of range',)
      exc_info = (<type 'exceptions.IndexError'>, IndexError('list index out of range',), <traceback object at 0x99794dc>)
      message = u'Caught an exception while rendering: list index out of range'
      source = (<django.template.loader.LoaderOrigin object at 0x991f30c>, (57, 82))