-
-
Notifications
You must be signed in to change notification settings - Fork 62
Problems with template context #411
-
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 5 comments · 7 replies
-
@CleitonDeLima Can you give the full stack trace so we can see where this happens? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Table Component
HTML
TracebackTraceback (most recent call last):
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/Projects/coral-sistemas/coral/licenses/decorators.py", line 13, in wrapper
return func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/Projects/coral-sistemas/coral/licenses/views.py", line 51, in license_list
return render_table(
^^^^^^^^^^^^^
File "/home/cleitonlima/Projects/coral-sistemas/coral/core/shortcuts.py", line 93, in render_table
response = render(request, template_name, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/shortcuts.py", line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 175, in render
return self._render(context)
^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 157, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 157, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_components/templatetags/component_tags.py", line 402, in render
rendered_component = component.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_components/component.py", line 255, in render
return template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 175, in render
return self._render(context)
^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 208, in render
return template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 177, in render
return self._render(context)
^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_tables2/templatetags/django_tables2.py", line 166, in render
return template.render(context={"table": table}, request=request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 175, in render
return self._render(context)
^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 157, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 157, in render
return compiled_parent._render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/test/utils.py", line 112, in instrumented_test_render
return self.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1064, in render
output = self.filter_expression.resolve(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 715, in resolve
obj = self.var.resolve(context)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 847, in resolve
value = self._resolve_lookup(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 914, in _resolve_lookup
current = current()
^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 79, in super
return mark_safe(self.render(self.context))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1064, in render
output = self.filter_expression.resolve(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 715, in resolve
obj = self.var.resolve(context)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 847, in resolve
value = self._resolve_lookup(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 914, in _resolve_lookup
current = current()
^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 79, in super
return mark_safe(self.render(self.context))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/defaulttags.py", line 238, in render
nodelist.append(node.render_annotated(context))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/loader_tags.py", line 63, in render
result = block.nodelist.render(context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in render
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 1005, in
return SafeString("".join([node.render_annotated(context) for node in self]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/base.py", line 966, in render_annotated
return self.render(context)
^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/defaulttags.py", line 193, in render
values = list(values)
^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_tables2/rows.py", line 244, in items
column.current_value = self.get_cell(column.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_tables2/rows.py", line 197, in get_cell
return self._get_and_render_with(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_tables2/rows.py", line 173, in _get_and_render_with
return render_func(bound_column, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_tables2/rows.py", line 206, in _call_render
content = call_with_appropriate(bound_column.render, render_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_tables2/utils.py", line 572, in call_with_appropriate
return fn(**kwargs)
^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django_tables2/columns/templatecolumn.py", line 68, in render
return get_template(self.template_name).render(context.flatten())
^^^^^^^^^^^^^^^^^
File "/home/cleitonlima/.cache/pypoetry/virtualenvs/coral-sistemas-qH-fHdlg-py3.11/lib/python3.11/site-packages/django/template/context.py", line 120, in flatten
flat.update(d)
ValueError: dictionary update sequence element #0 has length 1; 2 is required
|
Beta Was this translation helpful? Give feedback.
All reactions
-
The error seems to originate from django_tables2/columns/templatecolumn.py? Is that using django-components? https://github.com/jieter/django-tables2/blob/master/django_tables2/columns/templatecolumn.py#L68 |
Beta Was this translation helpful? Give feedback.
All reactions
-
My django-component (component with name 'table') uses |
Beta Was this translation helpful? Give feedback.
All reactions
-
Relevant ticket: https://code.djangoproject.com/ticket/24765 |
Beta Was this translation helpful? Give feedback.
All reactions
-
Maybe the problem is when rendering the component, the first |
Beta Was this translation helpful? Give feedback.
All reactions
-
Where is the RequestContext object created? Who sends it there? I'm trying to understand django-component's role in this. |
Beta Was this translation helpful? Give feedback.
All reactions
-
Every https://docs.djangoproject.com/en/5.0/howto/custom-template-tags/#writing-the-renderer |
Beta Was this translation helpful? Give feedback.
All reactions
-
If changing the line of code that you suggest doesn't break any of the existing tests I'm open to changing it. Feel free to open a PR! I'd suggest adding a test too so we don't accidentally break this in the future. |
Beta Was this translation helpful? Give feedback.
All reactions
-
@CleitonDeLima We think we fixed it in 0.63 that was just released. We were creating a Context class from the incoming context data. Problem is, when we got a Context we were wrapping a Context in a Context, resulting in the above error downstream. Thanks for reporting! |
Beta Was this translation helpful? Give feedback.
All reactions
-
Thanks @EmilStenstrom , this solves the problem. (sorry for the English, it's not my native language) |
Beta Was this translation helpful? Give feedback.
All reactions
-
Happy to hear that! Don't worry about english, none of the three most active people in the project (including me) has english as their first language. Viva Europe! |
Beta Was this translation helpful? Give feedback.
All reactions
-
😄 1
@CleitonDeLima We think we fixed it in 0.63 that was just released. We were creating a Context class from the incoming context data. Problem is, when we got a Context we were wrapping a Context in a Context, resulting in the above error downstream. Thanks for reporting!