﻿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
15963	Misleading FileField.save documentation, no reference to django.core.files.File	Ethan Jucovy	nobody	"The documentation for `FileField.save` (http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FieldFile.save) claims:

> Takes two required arguments: name which is the name of the file, and content which is a file-like object containing the file's contents. 

This is incorrect; `content` is *not* a ""file-like object"" -- it's a `django.core.files.File`-like object.

Attempting to do `field.save(name, open(my_file))` results in an `AttributeError: 'file' object has no attribute 'chunks'`.  The correct spelling is instead `field.save(name, django.core.files.File(open(my_file)))`.

I've attached a patch to the docs which makes this clear, and also refers the reader to the documentation about Django File objects."	Cleanup/optimization	closed	Documentation	1.3	Normal	fixed		ethan.jucovy@…	Ready for checkin	1	0	0	0	1	0
