Used :pep: role in various docs.

This commit is contained in:
Nick Pope 2020-04-30 10:30:11 +01:00 committed by Mariusz Felisiak
parent f9d13a1b5a
commit a9337b4add
7 changed files with 20 additions and 22 deletions

View file

@ -76,11 +76,9 @@ Here are some useful attributes of ``UploadedFile``:
for line in uploadedfile:
do_something_with(line)
Lines are split using `universal newlines`_. The following are recognized
as ending a line: the Unix end-of-line convention ``'\n'``, the Windows
convention ``'\r\n'``, and the old Macintosh convention ``'\r'``.
.. _universal newlines: https://www.python.org/dev/peps/pep-0278
Lines are split using :pep:`universal newlines <278>`. The following are
recognized as ending a line: the Unix end-of-line convention ``'\n'``, the
Windows convention ``'\r\n'``, and the old Macintosh convention ``'\r'``.
Subclasses of ``UploadedFile`` include:

View file

@ -1161,8 +1161,9 @@ Attributes
.. class:: FileResponse(open_file, as_attachment=False, filename='', **kwargs)
:class:`FileResponse` is a subclass of :class:`StreamingHttpResponse`
optimized for binary files. It uses `wsgi.file_wrapper`_ if provided by the
wsgi server, otherwise it streams the file out in small chunks.
optimized for binary files. It uses :pep:`wsgi.file_wrapper
<3333#optional-platform-specific-file-handling>` if provided by the wsgi
server, otherwise it streams the file out in small chunks.
If ``as_attachment=True``, the ``Content-Disposition`` header is set to
``attachment``, which asks the browser to offer the file to the user as a
@ -1178,8 +1179,6 @@ Attributes
The ``Content-Length`` and ``Content-Type`` headers are automatically set
when they can be guessed from contents of ``open_file``.
.. _wsgi.file_wrapper: https://www.python.org/dev/peps/pep-3333/#optional-platform-specific-file-handling
``FileResponse`` accepts any file-like object with binary content, for example
a file open in binary mode like so::