mirror of
https://github.com/jazzband/django-downloadview.git
synced 2026-03-16 22:40:25 +00:00
Reviewed documentation.
This commit is contained in:
parent
57b3cefbc9
commit
cd4a0dcf24
6 changed files with 23 additions and 12 deletions
5
INSTALL
5
INSTALL
|
|
@ -15,6 +15,11 @@ pip:
|
|||
|
||||
pip install django-downloadview
|
||||
|
||||
.. note::
|
||||
|
||||
Since version 1.1, django-downloadview requires Django>=1.5, which provides
|
||||
StreamingHttpResponse.
|
||||
|
||||
There is no need to register this application in your Django's
|
||||
``INSTALLED_APPS`` setting.
|
||||
|
||||
|
|
|
|||
14
README
14
README
|
|
@ -2,7 +2,9 @@
|
|||
django-downloadview
|
||||
###################
|
||||
|
||||
Django-DownloadView provides (class-based) generic download views for Django.
|
||||
Django-DownloadView provides generic views to make Django serve files.
|
||||
It supports delegation to the actual streaming to reverse proxies, via
|
||||
mechanisms such as Nginx's X-Accel.
|
||||
|
||||
Example, in some urls.py:
|
||||
|
||||
|
|
@ -22,10 +24,12 @@ Example, in some urls.py:
|
|||
|
||||
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.
|
||||
* ``ObjectDownloadView`` to serve some file field of a model.
|
||||
* ``StorageDownloadView`` to serve files in a storage, without models.
|
||||
* ``PathDownloadView`` to serve files located on local filesystem, without
|
||||
storage.
|
||||
* ``HTTPDownloadView`` to proxy some remote URL.
|
||||
* ``VirtualDownloadView`` to serve in-memory or generated files.
|
||||
|
||||
See :doc:`views` for details.
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Contents
|
|||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:titlesonly:
|
||||
|
||||
demo
|
||||
install
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ As a result, you get increased performance: reverse proxies are more efficient
|
|||
than Django at serving static files.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
nginx
|
||||
|
||||
|
|
@ -38,9 +39,7 @@ replaces ``DownloadResponse`` intance by some
|
|||
:py:class:`django_downloadview.nginx.XAccelRedirectResponse`.
|
||||
|
||||
|
||||
**********
|
||||
References
|
||||
**********
|
||||
.. rubric:: References
|
||||
|
||||
.. target-notes::
|
||||
|
||||
|
|
@ -48,4 +47,4 @@ References
|
|||
.. _`contributions are welcome`:
|
||||
https://github.com/benoitbryon/django-downloadview/issues?labels=optimizations
|
||||
.. _`Django's TemplateResponse`:
|
||||
https://docs.djangoproject.com/en/1.4/ref/template-response/
|
||||
https://docs.djangoproject.com/en/1.5/ref/template-response/
|
||||
|
|
|
|||
|
|
@ -183,9 +183,7 @@ configuration VS ``alias`` in nginx configuration: in a standard configuration,
|
|||
they should be equal.
|
||||
|
||||
|
||||
**********
|
||||
References
|
||||
**********
|
||||
.. rubric:: References
|
||||
|
||||
.. target-notes::
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@ Download views
|
|||
This section contains narrative overview about class-based views provided by
|
||||
django-downloadview.
|
||||
|
||||
By default, all of those views would stream the file to the client.
|
||||
But keep in mind that you can setup :doc:`/optimizations/index` to delegate
|
||||
actual streaming to a reverse proxy.
|
||||
|
||||
|
||||
******************
|
||||
ObjectDownloadView
|
||||
|
|
|
|||
Loading…
Reference in a new issue