mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #34194 -- Added django.utils.http.content_disposition_header().
This commit is contained in:
parent
3d3e955efa
commit
cbce427c17
5 changed files with 66 additions and 16 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue