Hi Collin, thanks for answering.
Yes this is the home view, but just to clarify, almost all of the
views of the project follow this pattern of a function that returns
the render shortcut. The templates of the views also follow the a
pattern in the sense they all extend from base.html, which is where
the calls for the templatetag are done. This is the full traceback:
0 errors found
December 23, 2014 - 09:53:07
Django version 1.6.2, using settings 'foo.settings'
Starting development server at
http://127.0.0.1:8000/
Quit the server with CONTROL-C.
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py",
line 206, in __call__
response = self.get_response(request)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 155, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 238, in handle_uncaught_exception
return callback(request, **param_dict)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/utils/decorators.py",
line 99, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/views/defaults.py",
line 46, in server_error
return http.HttpResponseServerError(template.render(Context({})))
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 140, in render
return self._render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 134, in _render
return self.nodelist.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 840, in render
bit = self.render_node(node, context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/debug.py",
line 78, in render_node
return node.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/loader_tags.py",
line 123, in render
return compiled_parent._render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 134, in _render
return self.nodelist.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 840, in render
bit = self.render_node(node, context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/debug.py",
line 78, in render_node
return node.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/defaulttags.py",
line 196, in render
nodelist.append(node.render(context))
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 1125, in render
return func(*resolved_args, **resolved_kwargs)
File "/home/xand/Documentos/src/Projetos/django-foo/app/templatetags/helper_tags.py",
line 14, in change_lang
path = context['request'].path
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/context.py",
line 56, in __getitem__
raise KeyError(key)
KeyError: 'request'
[23/Dec/2014 09:53:18] "GET /en/home HTTP/1.1" 500 59
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py",
line 206, in __call__
response = self.get_response(request)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 155, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 238, in handle_uncaught_exception
return callback(request, **param_dict)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/utils/decorators.py",
line 99, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/views/defaults.py",
line 46, in server_error
return http.HttpResponseServerError(template.render(Context({})))
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 140, in render
return self._render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 134, in _render
return self.nodelist.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 840, in render
bit = self.render_node(node, context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/debug.py",
line 78, in render_node
return node.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/loader_tags.py",
line 123, in render
return compiled_parent._render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 134, in _render
return self.nodelist.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 840, in render
bit = self.render_node(node, context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/debug.py",
line 78, in render_node
return node.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/defaulttags.py",
line 196, in render
nodelist.append(node.render(context))
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 1125, in render
return func(*resolved_args, **resolved_kwargs)
File "/home/xand/Documentos/src/Projetos/django-foo/app/templatetags/helper_tags.py",
line 14, in change_lang
path = context['request'].path
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/context.py",
line 56, in __getitem__
raise KeyError(key)
KeyError: 'request'
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py",
line 206, in __call__
response = self.get_response(request)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 155, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/core/handlers/base.py",
line 238, in handle_uncaught_exception
return callback(request, **param_dict)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/utils/decorators.py",
line 99, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/views/defaults.py",
line 46, in server_error
return http.HttpResponseServerError(template.render(Context({})))
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 140, in render
return self._render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 134, in _render
return self.nodelist.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 840, in render
bit = self.render_node(node, context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/debug.py",
line 78, in render_node
return node.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/loader_tags.py",
line 123, in render
return compiled_parent._render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 134, in _render
return self.nodelist.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 840, in render
bit = self.render_node(node, context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/debug.py",
line 78, in render_node
return node.render(context)
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/defaulttags.py",
line 196, in render
nodelist.append(node.render(context))
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/base.py",
line 1125, in render
return func(*resolved_args, **resolved_kwargs)
File "/home/xand/Documentos/src/Projetos/django-foo/app/templatetags/helper_tags.py",
line 14, in change_lang
path = context['request'].path
File "/home/xand/.virtualenvs/django-foo/local/lib/python2.7/site-packages/django/template/context.py",
line 56, in __getitem__
raise KeyError(key)
KeyError: 'request'
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
django-users...@googlegroups.com.
> To post to this group, send email to
django...@googlegroups.com.
> Visit this group at
http://groups.google.com/group/django-users.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-users/e1236721-cc22-4554-82b6-ddb2a9d068e3%40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.