mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #34194 -- Added django.utils.http.content_disposition_header().
This commit is contained in:
committed by
Mariusz Felisiak
parent
3d3e955efa
commit
cbce427c17
@@ -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.
|
||||
|
||||
@@ -321,6 +321,9 @@ Utilities
|
||||
documented functions for handling URL redirects. The Django functions were
|
||||
not affected.
|
||||
|
||||
* The new :func:`django.utils.http.content_disposition_header` function returns
|
||||
a ``Content-Disposition`` HTTP header value as specified by :rfc:`6266`.
|
||||
|
||||
Validators
|
||||
~~~~~~~~~~
|
||||
|
||||
|
||||
Reference in New Issue
Block a user