Serve files with Django.
Find a file
2013-04-09 16:50:24 +02:00
demo Encoded data written to StringIO. 2013-04-08 16:36:53 +02:00
django_downloadview Refs #29 - Improved HTTPDownloadView. 2013-04-09 16:50:24 +02:00
docs Refs #29 - Introduced HTTPFile and HTTPDownloadView to create proxy to arbitrary HTTP URL. 2013-04-08 15:39:06 +02:00
etc Merge pull request #28 from novagile/master 2013-03-20 08:24:23 -07:00
.gitignore Improved Makefile + some other minor improvements 2013-03-20 16:21:48 +01:00
.travis.yml Added support for TravisCI.org. 2013-03-20 16:22:38 +01:00
AUTHORS Improved Makefile + some other minor improvements 2013-03-20 16:21:48 +01:00
CHANGELOG Refs #29 - Introduced HTTPFile and HTTPDownloadView to create proxy to arbitrary HTTP URL. 2013-04-08 15:39:06 +02:00
INSTALL Reviewed documentation. Preparing first public release. 2012-12-04 11:47:37 +01:00
LICENSE Improved Makefile + some other minor improvements 2013-03-20 16:21:48 +01:00
Makefile Improved Makefile + some other minor improvements 2013-03-20 16:21:48 +01:00
MANIFEST.in Reviewed documentation. Preparing first public release. 2012-12-04 11:47:37 +01:00
README Added link to TravisCI.org in README. 2013-03-20 16:27:58 +01:00
setup.py Refs #29 - Introduced HTTPFile and HTTPDownloadView to create proxy to arbitrary HTTP URL. 2013-04-08 15:39:06 +02:00
VERSION Fixed development version number. 2012-12-10 11:43:41 +01:00

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

Django-DownloadView provides (class-based) generic download views for Django.

Example, in some urls.py:

.. code-block:: 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'),
   )

Several views are provided to cover frequent use cases:

* ``ObjectDownloadView`` when you have a model with a file field.
* ``StorageDownloadView`` when you manage files in a storage.
* ``PathDownloadView`` when you have an absolute filename on local filesystem.
* ``VirtualDownloadView`` when you the file is generated on the fly.

See :doc:`views` for details.

Then get increased performances with :doc:`optimizations/index`.
 

**********
Ressources
**********

* Documentation: http://django-downloadview.readthedocs.org
* 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