Hello i have try with cherrypy but i get this error:

def scarico(request, id):
    from cherrypy.lib.static import serve_file
    fil_da_scar = F_d.objects.get(pk=id)
    nome_file = fil_da_scar.nome_fil
    return serve_file('/home/luca111/Desktop/Luca/Webframework/
off_bert/disegni/'+nome_file+'.pdf','application/x-download',
'attachment')

Traceback (most recent call last):

  File "/usr/local/lib/python2.6/site-packages/django/core/servers/
basehttp.py", line 278, in run
    self.result = application(self.environ, self.start_response)

  File "/usr/local/lib/python2.6/site-packages/django/core/servers/
basehttp.py", line 636, in __call__
    return self.application(environ, start_response)

  File "/usr/local/lib/python2.6/site-packages/django/core/handlers/
wsgi.py", line 245, in __call__
    response = middleware_method(request, response)

  File "/usr/local/lib/python2.6/site-packages/django/middleware/
common.py", line 83, in process_response
    if response.status_code == 404:

AttributeError: 'generator' object has no attribute 'status_code'

What is wrong?

Regards

Luca


On 2 Set, 15:19, Andrew McGregor <[email protected]> wrote:
> > Hello can you tell me where i can find example how to download file
> > with django
>
> CURL?
>
> http://pycurl.sourceforge.net/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to