Serve files with Django.
Find a file
2020-01-14 10:24:28 +01:00
demo Add isort config. 2020-01-07 15:51:55 +01:00
django_downloadview Fix missing function parameter 2020-01-13 17:23:54 +02:00
docs Add signed file system storage 2020-01-13 11:25:40 +02:00
tests Fix flake8 errors. 2020-01-13 10:46:14 +01:00
.gitignore 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
.isort.cfg Add isort config. 2020-01-07 15:51:55 +01:00
.travis.yml Remove support for Python 2.7 2020-01-07 15:01:26 +01:00
AUTHORS Add signed file system storage 2020-01-13 11:25:40 +02:00
CHANGELOG Preparing release 2.1.1 2020-01-14 10:24:28 +01:00
CONTRIBUTING.rst Another broken link. 2020-01-07 14:32:17 +01:00
INSTALL Add signed file system storage 2020-01-13 11:25:40 +02:00
LICENSE 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
Makefile Add isort config. 2020-01-07 15:51:55 +01:00
MANIFEST.in Declared project as production/stable. 2015-06-24 14:10:33 +02:00
README.rst Convert readthedocs links for their .org -> .io migration for hosted projects 2016-06-27 22:42:16 +01:00
setup.py Add signed file system storage 2020-01-13 11:25:40 +02:00
tox.ini Validate black and isort on travis. 2020-01-07 15:55:44 +01:00
VERSION Preparing release 2.1.1 2020-01-14 10:24:28 +01:00

###################
django-downloadview
###################

`django-downloadview` makes it easy to serve files with `Django`_:

* you manage files with Django (permissions, filters, generation, ...);

* files are stored somewhere or generated somehow (local filesystem, remote
  storage, memory...);

* `django-downloadview` helps you stream the files with very little code;

* `django-downloadview` helps you improve performances with reverse proxies,
  via mechanisms such as Nginx's X-Accel or Apache's X-Sendfile.


*******
Example
*******

Let's serve a file stored in a file field of some model:

.. code:: python

   from django.conf.urls import url, url_patterns
   from django_downloadview import ObjectDownloadView
   from demoproject.download.models import Document  # A model with a FileField

   # ObjectDownloadView inherits from django.views.generic.BaseDetailView.
   download = ObjectDownloadView.as_view(model=Document, file_field='file')

   url_patterns = ('',
       url('^download/(?P<slug>[A-Za-z0-9_-]+)/$', download, name='download'),
   )


*********
Resources
*********

* Documentation: https://django-downloadview.readthedocs.io
* PyPI page: http://pypi.python.org/pypi/django-downloadview
* Code repository: https://github.com/benoitbryon/django-downloadview
* Bugtracker: https://github.com/benoitbryon/django-downloadview/issues
* Continuous integration: https://travis-ci.org/benoitbryon/django-downloadview
* Roadmap: https://github.com/benoitbryon/django-downloadview/milestones


.. _`Django`: https://djangoproject.com