I just followed the source back from django’s ClearableFileInput all the way to django’s model field magic… all the way to a little thing called FieldFile.
FieldFile can be faked with these minimum attributes:
from django.core.files.storage import default_storage
class FakeField(object):
storage = default_storage
fieldfile = FieldFile(None, FakeField, file_path)
form = SomeForm(initial={'filefield': fieldfile })
WHEW!
