Commit graph

98 commits

Author SHA1 Message Date
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
Aleksi Häkli
aacb5c7a16
Fix missing function parameter 2020-01-13 17:23:54 +02:00
Rémy HUBSCHER
bfb9c3cedb
Fix flake8 errors. 2020-01-13 10:46:14 +01:00
Aleksi Häkli
839b7bda38
Add signed file system storage
Fixes #138
2020-01-13 11:25:40 +02:00
Rémy HUBSCHER
c59cc37a0f
Validate black and isort on travis. 2020-01-07 15:55:44 +01:00
Rémy HUBSCHER
56e419bfc7
Add isort config. 2020-01-07 15:51:55 +01:00
Rémy HUBSCHER
8dad97c92d
Fix flake8 2020-01-07 15:42:04 +01:00
Rémy HUBSCHER
af30524bd2
Remove u'' in front of strings. 2020-01-07 15:21:34 +01: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
ac1e4dc9ce Fix StorageFile compatibility & some lint issues 2020-01-07 11:34:51 +01:00
Fabre Florian
0ad5e1238a Fix middleware compatibility issues 2020-01-07 11:09:25 +01:00
Benoît Bryon
56214264f1 HTTPFile has 'content_type' property. Allows HTTPDownloadView to proxy Content-Type header. Refs #116 2016-03-14 17:05:32 +01:00
Benoît Bryon
08031dab21 Improved support of Python-3.5 and Django-1.9. Refs #112, refs #113. 2016-03-14 15:40:13 +01:00
Benoît Bryon
bdf8e6e368 Psycho-rebased work of @benesch and @zerc on top of master. 2015-07-20 18:14:08 +02:00
zero13cool
bf7b0f23fd Refs #104 - Convert datetime to unix timestamp 2015-07-16 22:00:27 +03:00
René Leonhardt
75b51ce214 Avoid calling get_path() twice inside get_file
Overridden PathDownloadView.get_path() may contain database lookups and logging which should not be called twice if not necessary, as it was in my case.
Because the acquired filename does not change inside get_file(), I replaced the duplicate call.
2015-07-14 12:03:52 +02:00
Benoît Bryon
5fa0a6caea Psycho-rebased branch 87-double-quoted-filename on top of master 2015-06-13 00:57:44 +02:00
Benoît Bryon
2d04d30ba4 Refs #97 - Code style. 2015-06-12 20:51:51 +02:00
Benoît Bryon
d122c68455 Refs #97 - Splitted StringIteratorIO into TextIteratorIO and BytesIteratorIO. StringIteratorIO remains for backward compatibility. 2015-06-12 16:47:46 +02:00
Benoît Bryon
c54131db6e Refs #98 - Moved tests outside django-downloadview package, i.e. in tests/ folder at project root. 2015-06-12 15:42:50 +02:00
Benoît Bryon
047745f084 Refs #97 - HTTPFile proxies decoded file wrapper (was undecoded urllib3 file wrapper). 2015-06-11 17:02:18 +02:00
CJ
fbb0f30f2a refs #87 quotes for ascii filename to fix doctest 2014-06-06 12:07:12 -04:00
CJ
3b124f0cdb refs #87 quotes for ascii filename to fix doctest 2014-06-06 11:59:50 -04:00
CJ
d7073be658 refs #87 assert_basename test failing
Added quotes to assert_basename test.
2014-06-06 11:49:30 -04:00
CJ
616c822b6c refs #87 Quotes around ascii filename, not utf-8
Updated the test to go with my change.
2014-06-06 10:37:54 -04:00
CJ
77166d2969 refs #87 Quotes around ascii filename, not utf-8 2014-06-06 10:37:04 -04:00
CJ
1407c0cc4e Tests updated for double quotes around filename 2014-06-06 09:58:37 -04:00
CJ
7b2d8215e6 Filename surrounded by double quotes.
Chrome will give a Duplicate Header error if a file name has a comma in it, and the file name is not surrounded by  double quotes.
2014-06-06 09:55:20 -04:00
Benoît Bryon
5c262dfa52 Fixed compliance to latest flake8. 2014-03-31 16:53:17 +02:00
Benoît Bryon
eeaabd2a37 Refs #80 - Added a test around demo's 'object:inline_file' URL. 2014-03-03 08:15:46 +01:00
Benoît Bryon
7875999fe2 Refs #80 - Improved documentation about 'DownnloadMixin.attachment' attribute. 2014-03-03 07:49:30 +01:00
Benoît Bryon
70c6b00442 Refs #46 - Fixed Python 2 and Python 3 compatibility in doctests related to string/unicode. 2014-02-25 00:47:20 +01:00
Rémy HUBSCHER
1ea2790ba9 Refs #46 -- Add Py3 support. 2014-02-16 19:13:44 +01:00
Benoît Bryon
d587c515f0 Refs #74 - Switched to tox as test-environment manager. Added flake8 to the test suite. Dropped python 2.6 tests. Makefile no longer creates a virtualenv. 2014-02-10 01:27:14 +01:00
Benoît Bryon
6dd090757a Refs #41 - Added 'mimetype' and 'encoding' arguments to 'DownloadMixin' => supported all arguments of original sendfile() function. Added documentation about migrating from django-sendfile to django-downloadview. 2013-11-29 00:55:46 +01:00
Benoît Bryon
59d9b4966e Refs #41 - django_downloadview.sendfile is a PathDownloadView (was StorageDownloadView). PathDownloadView.get_file() raises FileNotFound if file does not exists. 2013-11-28 23:29:50 +01:00
Benoît Bryon
e33a8165ef Refs #2 - Introduced support of Lighttpd's X-Sendfile (mostly copied from django_downloadview.apache). 2013-11-28 23:02:40 +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
567cf591b9 Refs #43 - ObjectDownloadView.get_file() raises FileNotFound if field is empty. Raises AttributeError if field does not exist (view or model is misconfigured). 2013-11-24 10:09:46 +01:00
Benoît Bryon
0b2a26e180 Refs #43 - ObjectDownloadView.get_file() raises FileNotFound if file field does not exists or is empty. Introduced DownloadMixin.file_not_found_response(). 2013-11-24 10:03:11 +01:00
Benoît Bryon
f2d5a92b99 Refs #7 - Urlencoded non US-ASCII characters in Content-Disposition header (file name). 2013-11-18 12:12:02 +01:00
Benoît Bryon
f170c8904b Psycho-rebased branch 60-virtualfile-force-bytes on top of master 2013-11-08 09:59:51 +01:00
Benoît Bryon
c141f027de Refs #60 - VirtualFile uses force_bytes(). Removed (wrong) patch of File.__iter__(). 2013-11-08 09:56:26 +01:00
Benoît Bryon
c372cac003 Refs #57 - PathDownloadView opens files in binary mode by default. 2013-11-08 09:38:57 +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
2c1ad3c730 ObjectDownloadView now inherits from SingleObjectMixin and BaseDownloadView. Added example for setup_view() in documentation. 2013-11-05 11:44:48 +01:00
Benoît Bryon
0371f84f26 Added unit tests around BaseDownloadView. Introduced setup_view() test utility. 2013-11-05 07:29:58 +01:00
Benoît Bryon
def3e97a39 Added unit tests for DownloadMixin. 2013-11-04 23:20:13 +01:00