mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #36570 -- Removed unnecessary :py domain from documentation roles.
Signed-off-by: SaJH <wogur981208@gmail.com>
This commit is contained in:
@@ -13,7 +13,7 @@ The ``File`` class
|
||||
.. class:: File(file_object, name=None)
|
||||
|
||||
The :class:`File` class is a thin wrapper around a Python
|
||||
:py:term:`file object` with some Django-specific additions.
|
||||
:term:`file object` with some Django-specific additions.
|
||||
Internally, Django uses this class when it needs to represent a file.
|
||||
|
||||
:class:`File` objects have the following attributes and methods:
|
||||
@@ -29,14 +29,14 @@ The ``File`` class
|
||||
|
||||
.. attribute:: file
|
||||
|
||||
The underlying :py:term:`file object` that this class wraps.
|
||||
The underlying :term:`file object` that this class wraps.
|
||||
|
||||
.. admonition:: Be careful with this attribute in subclasses.
|
||||
|
||||
Some subclasses of :class:`File`, including
|
||||
:class:`~django.core.files.base.ContentFile` and
|
||||
:class:`~django.db.models.fields.files.FieldFile`, may replace this
|
||||
attribute with an object other than a Python :py:term:`file
|
||||
attribute with an object other than a Python :term:`file
|
||||
object`. In these cases, this attribute may itself be a
|
||||
:class:`File` subclass (and not necessarily the same subclass).
|
||||
Whenever possible, use the attributes and methods of the subclass
|
||||
|
||||
Reference in New Issue
Block a user