Benoît Bryon
Benoît Bryon
``` python >>> from django_downloadview import response >>> response.content_disposition('[[email protected]:22]-[2067].zip') "attachment; filename=[[email protected]:22]-[2067].zip; filename*=UTF-8''%5Bpbs%2Bssh%40example.com%3A22%5D-%5B2067%5D.zip" ``` If django_downloadview is given not-urlencoded filename, it should return the content-disposition as shown above. Another thing that...
> I think the documentation about x-sendfile for Apache and lighttpd has some wrong code imports True! Thanks for the report @pkaczynski :) **Cause:** [includes in Sphinx using "lines"](https://github.com/benoitbryon/django-downloadview/blob/1.9/docs/optimizations/lighttpd.txt#L36) **Consequence:**...
> How is the lighttpd backend different than apache for x-sendfile? The code for django_downloadview.lighttpd.XSendfileMiddleware is quite identical to django_downloadview.apache.XSendfileMiddleware. Are there any other differences? I think code for Apache...
> The reason I'm asking is that I tried to make media files private (i.e. accessible only by Djnago authenticated users) but accessed through lighttpd (like all static files, but...
Maybe a sequence diagram could help understand each other (may improve documentation too): Here is the classic (the one I know) sequence: (edited via websequencediagrams.com) ``` client->Apache: GET /files/sample/ Apache->Django:...
Here are notes about fixing the django-downloadview/lighttpd docs: - DOWNLOADVIEW_BACKEND example is there: https://github.com/benoitbryon/django-downloadview/blob/1.9/demo/demoproject/settings.py#L80 - DOWNLOADVIEW_RULES example is there: https://github.com/benoitbryon/django-downloadview/blob/1.9/demo/demoproject/settings.py#L101-L109
A naive implementation could use `{{ extra_classes }}` context data in [templates/floppyforms/attrs.html](https://github.com/gregmuellegger/django-floppyforms/blob/master/floppyforms/templates/floppyforms/attrs.html). Something like that: ``` {{ name }}{% if value|stringformat:"s" != "True" or value != 1 %}="{{ value }}{%...
Disclaimer: I had a very quick look at this thread and I've not been coding with Django for some time now... I haven't figured out where is the issue at...
Consider this snippet by @brunobord: ``` python import csv import cStringIO as StringIO from django_downloadview import VirtualDownloadView, DownloadMixin, VirtualFil class CsvDownloadMixin(DownloadMixin): """CSV download helper.""" delimiter = ";" quotechar = '"'...
The implementation should use generators. See http://django-downloadview.readthedocs.org/en/1.5/views/virtual.html#stream-generated-content