summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorJosh Schneier <josh.schneier@gmail.com>2017-04-19 14:48:01 -0400
committerTim Graham <timograham@gmail.com>2017-04-25 20:17:31 -0400
commit1f1040aa54e3ee35bbb5fd17486fa1f1707b6b6b (patch)
tree2c3bf3c0ae63f9d83b75e3f4360d8503bcd9b8ff /docs/ref
parent4a89000ccf0483c67f66709cca90fc50ad82aacc (diff)
[1.11.x] Removed nonexistent methods from File's docs.
read() and write() were removed in 68a890e79f660484d05482902663b6168f0bd71e. Backport of 98ee57e343206ef553de78b22be5e9a6dacb5060 from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/files/file.txt19
-rw-r--r--docs/ref/models/fields.txt7
2 files changed, 7 insertions, 19 deletions
diff --git a/docs/ref/files/file.txt b/docs/ref/files/file.txt
index 6c218e38b3..5d6325bce6 100644
--- a/docs/ref/files/file.txt
+++ b/docs/ref/files/file.txt
@@ -56,11 +56,6 @@ The ``File`` class
was originally opened with; ``None`` means to reopen with the original
mode.
- .. method:: read(num_bytes=None)
-
- Read content from the file. The optional ``size`` is the number of
- bytes to read; if not specified, the file will be read to the end.
-
.. method:: __iter__()
Iterate over the file yielding one line at a time.
@@ -78,22 +73,16 @@ The ``File`` class
Returns ``True`` if the file is large enough to require multiple chunks
to access all of its content give some ``chunk_size``.
- .. method:: write(content)
-
- Writes the specified content string to the file. Depending on the
- storage system behind the scenes, this content might not be fully
- committed until :func:`close()` is called on the file.
-
.. method:: close()
Close the file.
In addition to the listed methods, :class:`~django.core.files.File` exposes
the following attributes and methods of its ``file`` object:
- ``encoding``, ``fileno``, ``flush``, ``isatty``, ``newlines``,
- ``read``, ``readinto``, ``readlines``, ``seek``, ``softspace``, ``tell``,
- ``truncate``, ``writelines``, ``xreadlines``, ``readable()``,
- ``writable()``, and ``seekable()``.
+ ``encoding``, ``fileno``, ``flush``, ``isatty``, ``newlines``, ``read``,
+ ``readinto``, ``readline``, ``readlines``, ``seek``, ``softspace``,
+ ``tell``, ``truncate``, ``write``, ``writelines``, ``xreadlines``,
+ ``readable()``, ``writable()``, and ``seekable()``.
.. versionchanged:: 1.11
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index b034a80dd7..cdc4371d37 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -777,10 +777,9 @@ the result of the :attr:`Storage.open()<django.core.files.storage.Storage.open>`
method, which may be a :class:`~django.core.files.File` object, or it may be a
custom storage's implementation of the :class:`~django.core.files.File` API.
-In addition to the API inherited from
-:class:`~django.core.files.File` such as :meth:`~django.core.files.File.read`
-and :meth:`~django.core.files.File.write`, :class:`FieldFile` includes several
-methods that can be used to interact with the underlying file:
+In addition to the API inherited from :class:`~django.core.files.File` such as
+``read()`` and ``write()``, :class:`FieldFile` includes several methods that
+can be used to interact with the underlying file:
.. warning::