﻿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
12106	FileFields ignore initial data when required=False	Dave Hall	nobody	"If you create a form containing a `FileField` where `required=False`, then the field will ignore any initial value passed in.

{{{
#!python
from django import forms
from django.core.files import File

class MyForm(forms.Form):
    file_field = forms.FileField(required=False)

test_file = File(open(""test.txt""))

form = MyForm(data={}, initial={""file_field"": test_file})

form.is_valid()  # Force form validation.

print form.cleaned_data[""file_field""]  # prints None
}}}

Given that an initial value was supplied, the `cleaned_data` should now contain the initial value.  However, it contains None, as the initial value has been silently discarded."		closed	Forms	1.1		fixed			Accepted	1	0	1	0	0	0
