diff options
| author | Alex Vandiver <alex@chmrr.net> | 2022-11-30 15:09:49 -0500 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-12-05 13:08:00 +0100 |
| commit | cbce427c17b66faec7ced0639346dc6905a498f9 (patch) | |
| tree | 894b0990050dcf94c36010838717dd96351fbcc5 /docs/ref/utils.txt | |
| parent | 3d3e955efaaeb4cc968e522592c5c1e47bdc72c4 (diff) | |
Fixed #34194 -- Added django.utils.http.content_disposition_header().
Diffstat (limited to 'docs/ref/utils.txt')
| -rw-r--r-- | docs/ref/utils.txt | 9 |
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. |
