﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29411	Pickling of a form fails after a form was used in a template	Torsten Bronger	nobody	"The following view function fails from its second invocation on:

{{{
def main(request):
    import django.forms as forms
    import pickle
    pickle.dump(forms.Form(), open(""/dev/null"", ""wb""))  # This fails, but not at the very first invocation.
    return render(request, ""main.html"", {""example_form"": ExampleForm()})
}}}

Steps to reproduce:

1. `django-admin startproject pickle_problem`
2. `cd pickle_problem`
3. Apply the attached patch with `-p1`.
4. Apply migrations, start testserver.
5. Open the URL “/” on the testserver.  You should see a bogus form with one boolean field.
6. Reload the page.

What happens:

The pickling of `form.Form()` fails.  See the attached traceback.

I observe this problem since Django 1.11.  Up to Django 1.10, it has worked fine for me.
"	Bug	closed	Forms	2.0	Normal	duplicate			Unreviewed	0	0	0	0	0	0
