close() [source] Close the file. In addition to the listed
class ContentFile(File) [source] The ContentFile class inherits from File
chunks(chunk_size=None) [source] Iterate over the file yielding “chunks” of a given size
open(mode=None) [source] Open or reopen the file (which also does File.seek(0))
__iter__() [source] Iterate over the file yielding one line at a time.
read(num_bytes=None) Read content from the file. The optional size is the number of bytes to read; if not specified
class File(file_object) [source] The File class is a thin wrapper around a Python
name The name of the file including the relative path from MEDIA_ROOT.
Page 2 of 2