I tracked the pickling error to the
Form.renderer.engine.engine.template_libraries dict.
I can more or less reproduce (different error message, but hopefully same
cause) with:
{{{
from django.forms.renderers import get_default_renderer
import pickle
renderer = get_default_renderer()
renderer.engine
pickle.dumps(renderer)
PicklingError: Can't pickle <function add_preserved_filters at
0x7f2468bfc620>: it's not the same object as
django.contrib.admin.templatetags.admin_urls.add_preserved_filters
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28223>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/28223#comment:1>
* owner: nobody => Gaurav Sehgal
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28223#comment:2>
Comment (by Carlton Gibson):
#29411 is a duplicate of this, with a slightly different reproduce case.
--
Ticket URL: <https://code.djangoproject.com/ticket/28223#comment:3>
* cc: Torsten Bronger (added)
Comment:
To copy over important information from duplicate:
This broke in 1.11 and had worked in 1.10 and before.
--
Ticket URL: <https://code.djangoproject.com/ticket/28223#comment:4>
Comment (by za):
Is this bug related with this
https://docs.djangoproject.com/en/2.1/releases/1.11/#django-template-
backends-django-template-render-prohibits-non-dict-context ?
--
Ticket URL: <https://code.djangoproject.com/ticket/28223#comment:5>
Comment (by Tim Graham):
I believe template widget rendering
(b52c73008a9d67e9ddbb841872dc15cdd3d6ee01 introduced this issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/28223#comment:6>
* cc: Martin Honermeyer (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/28223#comment:7>
* cc: Matti Haavikko (added)
--
Ticket URL: <https://code.djangoproject.com/ticket/28223#comment:8>