idlesign/django-sitetree

1.11.0 seems to have compatibility issue with taggit

wmfox3 opened this issue · 5 comments

I'm not entirely sure 1.11.0 has introduced an issue with taggit, but I previously did not have problems with django-sitetree. Removing a TaggableManager field from my custom site item model, cleared up the problem.

With the field restored to the site item model, Django reports a TypeError exception: render() got an unexpected keyword argument 'renderer'

at

python3.6/site-packages/django/forms/boundfield.py in as_widget, line 93

I'm using Django 2.1 with Python 3.6.5

Here's the entire Traceback:

Traceback:

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
  34.             response = get_response(request)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  156.                 response = self.process_exception_by_middleware(e, request)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
  154.                 response = response.render()

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/response.py" in render
  106.             self.content = self.rendered_content

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/response.py" in rendered_content
  83.         content = template.render(context, self._request)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/backends/django.py" in render
  61.             return self.template.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  171.                     return self._render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/test/utils.py" in instrumented_test_render
  96.     return self.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/test/utils.py" in instrumented_test_render
  96.     return self.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/test/utils.py" in instrumented_test_render
  96.     return self.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/test/utils.py" in instrumented_test_render
  96.     return self.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/test/utils.py" in instrumented_test_render
  96.     return self.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  150.             return compiled_parent._render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/test/utils.py" in instrumented_test_render
  96.     return self.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  62.                 result = block.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  987.             output = self.filter_expression.resolve(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in resolve
  671.                 obj = self.var.resolve(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in resolve
  796.             value = self._resolve_lookup(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in _resolve_lookup
  858.                             current = current()

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in super
  76.             return mark_safe(self.render(self.context))

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  62.                 result = block.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  62.                 result = block.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  209.                     nodelist.append(node.render_annotated(context))

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/loader_tags.py" in render
  188.             return template.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  173.                 return self._render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/test/utils.py" in instrumented_test_render
  96.     return self.nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  209.                     nodelist.append(node.render_annotated(context))

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  209.                     nodelist.append(node.render_annotated(context))

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  309.                 return nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/defaulttags.py" in render
  309.                 return nodelist.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  937.                 bit = node.render_annotated(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_annotated
  904.             return self.render(context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render
  993.         return render_value_in_context(output, context)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/template/base.py" in render_value_in_context
  972.             value = str(value)

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/utils/html.py" in <lambda>
  397.     klass.__str__ = lambda self: mark_safe(klass_str(self))

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/forms/boundfield.py" in __str__
  33.         return self.as_widget()

File "/Users/wmfox3/.virtualenvs/imgind-U3uP0D1o/lib/python3.6/site-packages/django/forms/boundfield.py" in as_widget
  93.             renderer=self.form.renderer,

Exception Type: TypeError at /admin/architect/imageindsitetree/1/change/item_add/
Exception Value: render() got an unexpected keyword argument 'renderer'

I've been using taggit with Django 2.1 for awhile, so I don't know that that's an issue. Taggit on my other models don't appear to be causing issues. I've got the current version of taggit 0.22.2 installed.

I should add that the error appears in the Django admin interface when attempting to add a site tree item.

Unable to reproduce it using the latest (0.23.0) taggit: custom sitetree items are created as usual.
Please try to upgrade taggit.

Considered closed.
Feel free to reopen if required.