Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
98ee57e3
Kaydet (Commit)
98ee57e3
authored
Nis 19, 2017
tarafından
Josh Schneier
Kaydeden (comit)
Tim Graham
Nis 25, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed nonexistent methods from File's docs.
read() and write() were removed in
68a890e7
.
üst
a78fd2ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
19 deletions
+7
-19
file.txt
docs/ref/files/file.txt
+4
-15
fields.txt
docs/ref/models/fields.txt
+3
-4
No files found.
docs/ref/files/file.txt
Dosyayı görüntüle @
98ee57e3
...
...
@@ -59,11 +59,6 @@ The ``File`` class
Returns ``self``, so that it can be used similar to Python's
built-in :func:`python:open()` with the ``with`` statement.
.. 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.
...
...
@@ -81,22 +76,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
``,
``t
runcate``, ``writelines``, ``xreadlines``, ``readable()
``,
``writable()``, and ``seekable()``.
``encoding``, ``fileno``, ``flush``, ``isatty``, ``newlines``,
``read``,
``read
into``, ``readline``, ``readlines``, ``seek``, ``softspace
``,
``t
ell``, ``truncate``, ``write``, ``writelines``, ``xreadlines
``,
``
readable()``, ``
writable()``, and ``seekable()``.
.. versionchanged:: 1.11
...
...
docs/ref/models/fields.txt
Dosyayı görüntüle @
98ee57e3
...
...
@@ -760,10 +760,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::
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment