Unverified Commit bab6d253 authored by Diederik van der Boor's avatar Diederik van der Boor
Browse files

Bump to v2.1

parent 713f9188
Changelog
=========
Changes in 2.1 (2018-05-08)
---------------------------
* Added ``serve_file_not_found()`` to allow custom 404 serving in ``PrivateStorageView`` and ``PrivateStorageDetailView``.
* Added ``Cache-Control`` headers to avoid caching private files in edge proxies.
* Fixed ``PrivateStorageDetailView`` to use using the custom storage class defined in the model's ``PrivateFileField``.
* Fixed ``Content-Disposition`` filename encoding in Python 3.
* Fixed ``Content-Disposition`` filename support for old Internet Explorer browsers.
Changes in 2.0 (2018-02-06)
---------------------------
......
......@@ -159,6 +159,15 @@ create a custom view that provides the download.
# This overrides PRIVATE_STORAGE_AUTH_FUNCTION
return True
The following class-level attributes can be overwritten:
* ``model``: The model to fetch (including every other attribute of ``SingleObjectMixin``).
* ``model_file_field``: This should point to the field used to store the file.
* ``storage`` / ``get_storage()``: The storage class to read the file from.
* ``server_class``: The Python class used to generate the ``HttpResponse`` / ``FileResponse``.
* ``content_disposition``: Can be "inline" (show inside the browser) or "attachment" (saved as download).
* ``content_disposition_filename`` / ``get_content_disposition_filename()``: Overrides the filename for downloading.
Optimizing large file transfers
-------------------------------
......
# following PEP 440
__version__ = "2.0"
__version__ = "2.1"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment