summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorNick Pope <nick.pope@flightdataservices.com>2020-04-30 10:30:11 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-13 09:38:40 +0200
commit15d76dc2abefc799ecbc3545ae90aefe765d4144 (patch)
tree79791c8d35b42625894f5085f049e610418cad3b /docs/ref
parentd6e6695d9352720fd626b3a6e7f8c836d5da346e (diff)
[3.1.x] Used :pep: role in various docs.
Backport of a9337b4add01e50ed8ff8d3ef44099a08cba475c from master
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/files/uploads.txt8
-rw-r--r--docs/ref/request-response.txt7
2 files changed, 6 insertions, 9 deletions
diff --git a/docs/ref/files/uploads.txt b/docs/ref/files/uploads.txt
index 0021800a64..4ce4eb991a 100644
--- a/docs/ref/files/uploads.txt
+++ b/docs/ref/files/uploads.txt
@@ -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:
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index a769af581b..0374ae3b0f 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -1173,8 +1173,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
@@ -1190,8 +1191,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::