mirror of
https://github.com/jazzband/django-downloadview.git
synced 2026-03-16 22:40:25 +00:00
Fix code examples in the optimization chapter of the documentation.
This commit is contained in:
parent
af67e0036f
commit
e0dc0b0c41
3 changed files with 9 additions and 9 deletions
|
|
@ -51,20 +51,20 @@ Example:
|
|||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 64-71
|
||||
:lines: 63-70
|
||||
|
||||
Then set ``django_downloadview.apache.XSendfileMiddleware`` as
|
||||
``DOWNLOADVIEW_BACKEND``:
|
||||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 77
|
||||
:lines: 79
|
||||
|
||||
Then register as many ``DOWNLOADVIEW_RULES`` as you wish:
|
||||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 80, 85-87, 93, 103
|
||||
:lines: 84, 92-100, 110
|
||||
|
||||
Each item in ``DOWNLOADVIEW_RULES`` is a dictionary of keyword arguments passed
|
||||
to the middleware factory. In the example above, we capture responses by
|
||||
|
|
|
|||
|
|
@ -57,20 +57,20 @@ Example:
|
|||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 64-71
|
||||
:lines: 63-70
|
||||
|
||||
Then set ``django_downloadview.lighttpd.XSendfileMiddleware`` as
|
||||
``DOWNLOADVIEW_BACKEND``:
|
||||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 78
|
||||
:lines: 80
|
||||
|
||||
Then register as many ``DOWNLOADVIEW_RULES`` as you wish:
|
||||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 80, 94-96, 102, 103
|
||||
:lines: 84, 101-110
|
||||
|
||||
Each item in ``DOWNLOADVIEW_RULES`` is a dictionary of keyword arguments passed
|
||||
to the middleware factory. In the example above, we capture responses by
|
||||
|
|
|
|||
|
|
@ -52,20 +52,20 @@ Example:
|
|||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 64-71
|
||||
:lines: 63-70
|
||||
|
||||
Then set ``django_downloadview.nginx.XAccelRedirectMiddleware`` as
|
||||
``DOWNLOADVIEW_BACKEND``:
|
||||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 75
|
||||
:lines: 76
|
||||
|
||||
Then register as many ``DOWNLOADVIEW_RULES`` as you wish:
|
||||
|
||||
.. literalinclude:: /../demo/demoproject/settings.py
|
||||
:language: python
|
||||
:lines: 80, 81-84, 103
|
||||
:lines: 84-89
|
||||
|
||||
Each item in ``DOWNLOADVIEW_RULES`` is a dictionary of keyword arguments passed
|
||||
to the middleware factory. In the example above, we capture responses by
|
||||
|
|
|
|||
Loading…
Reference in a new issue