Commit graph

20 commits

Author SHA1 Message Date
pre-commit-ci[bot]
73f9c013cd [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-10-20 19:50:02 +00:00
Rémy HUBSCHER
711b2e50b5
Run pre-commit on all files 2024-08-05 10:53:19 +02:00
Davide
d385cbba6f
Use hasattr to check if any of required attribute is present 2024-07-31 16:18:20 +02:00
Davide
ff5073d00b
Use python3 super and remove useless method re-definitions 2023-09-26 11:26:43 +02:00
Peter Marheine
a64a0e8c33 Split DownloadDispatcherMiddleware into two classes
Instantiating a middleware but not using it as a middleware was a
strange behavior, so this change splits the dispatching out to another
class with a more specialized API and uses that middleware.
2021-12-23 13:05:45 +11:00
Peter Marheine
0ab8aa3e8f Stop using django.util.deprecation.MiddlewareMixin
That class is intended primarily for compatibility with Pre-1.10
middleware, and recently gained a check that get_response is not None.
This package ensures an unexpecified `get_response` function is never
called on its own, so it's simplest to manually implement the middleware
API.
2021-12-23 13:05:45 +11:00
Peter Marheine
95b36fc843 Import ABCs from collections.abc, not collections
The types in collections.abc were moved from just collections in Python
3.3, and Python 3.10 removed the old aliases. We no longer support
Python versions earlier than 3.3 and need to support 3.10, so update the
import.
2021-12-23 10:27:14 +11:00
Tim Gates
e2da75ec9d
docs: Fix simple typo, instanciate -> instantiate
There is a small typo in django_downloadview/middlewares.py.

Should read `instantiate` rather than `instanciate`.
2020-03-08 18:03:42 +11:00
Rémy HUBSCHER
6c7c8d9a60
Add isort support. 2020-01-07 15:19:22 +01:00
Rémy HUBSCHER
b094ed6cec
Add black support. 2020-01-07 15:12:51 +01:00
Rémy HUBSCHER
b893e52eba
Remove support for Python 2.7 2020-01-07 15:01:26 +01:00
Fabre Florian
0ad5e1238a Fix middleware compatibility issues 2020-01-07 11:09:25 +01:00
Benoît Bryon
8b44724c90 Refs #36 - Introduced support of Apache X-Sendfile. 2013-11-26 09:30:19 +01:00
Benoît Bryon
e9d9b3dfaa Refs #25 - Introduced SmartDownloadMiddleware: makes it possible to setup several rules given a single optimization backend. 2013-11-07 00:09:30 +01:00
Benoît Bryon
874f3b9b54 Refs #25, refs #39, refs #40, refs #42 - Big refactoring in documentation and demo: narrative documentation uses examples from demo project. 2013-10-28 16:58:18 +01:00
Benoît Bryon
588b1b0a6e Introduced DownloadDispatcherMiddleware and settings.DOWNLOADVIEW_MIDDLEWARES. Deprecated most options for former global XAccelRedirectMiddleware. Splitted nginx module into a package. Introduced BaseDownloadMiddleware. 2013-10-04 18:11:16 +02:00
Benoît Bryon
a012b11e97 Refs #21 and refs #23 - Download view passes a file wrapper to download response. The file wrapper encapsulates file attributes such as name, size or URL (introduced URL). 2012-12-13 19:01:50 +01:00
Benoît Bryon
4f29852ddb Reviewed documentation. Preparing first public release. 2012-12-04 11:47:37 +01:00
Benoit Bryon
9762025d1a Refs #1 - Fixed nginx middleware. Populated documentation (examples should be moved to demo project). 2012-11-28 19:04:13 +01:00
Benoit Bryon
46542cdc3c Refs #3 - Introduced base decorators and middlewares. 2012-11-19 14:41:52 +01:00