On Fri, Oct 2, 2009 at 7:51 AM, Marcelo Criscuolo (Jaú)
wrote:
> I'm thinking of something like this in the view:
>
> response = HttpResponse(mimetype="")
> input = read contents of your hidden file
> response.write(input)
> return response
and once it's working, replace the actual data copying
I'd try to use HttpResponse as a file object. As in
http://docs.djangoproject.com/en/dev/howto/outputting-pdf/#write-your-view.
I'm thinking of something like this in the view:
response = HttpResponse(mimetype="")
input = read contents of your hidden file
response.write(input)
return response
I am creating a password-protected file repository. I would like to
create a login_required view that returns the file without revealing
it's actual location in the file system.
Can I return an actual file (not it's location) from a view?
--~--~-~--~~~---~--~~
You r
3 matches
Mail list logo