summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/utils.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 1c9141a986..b1a08dc0e1 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -729,6 +729,15 @@ escaping HTML.
Outputs a string in the format ``Wdy, DD Mon YYYY HH:MM:SS GMT``.
+.. function:: content_disposition_header(as_attachment, filename)
+
+ .. versionadded:: 4.2
+
+ Constructs a ``Content-Disposition`` HTTP header value from the given
+ ``filename`` as specified by :rfc:`6266`. Returns ``None`` if
+ ``as_attachment`` is ``False`` and ``filename`` is ``None``, otherwise
+ returns a string suitable for the ``Content-Disposition`` HTTP header.
+
.. function:: base36_to_int(s)
Converts a base 36 string to an integer.