I am not aware of such a way; I think HttpResponse does a single thing.  
But you could create a page which embeds a link to the results file and 
redirect the user to that (I often find that  having an "outcomes" page 
with some explanation is attached is helpful to the user).  Like many 
similar sites (e.g. there is one that creates an MP3 from a YouTube Video), 
the link is only active for a while; you can run a cron job, or similar, in 
the background to remove the file after a while.

On Saturday, 25 November 2017 18:06:43 UTC+2, Enikő Regényi wrote:
>
> Thanks, I managed to put together something that uploads input, processes 
> the data and downloads the results. I bumped into a problem though: I would 
> like to redirect the user AND download the file. Is that possible somehow? 
> (I apologize if this is a trivial question,  I am new to django and fairly 
> new to programming too) Can I concatenate HttpResponse objects somehow? I 
> tried, but it errors out. 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fcc87fc5-9668-494d-a8e1-07f94d25af97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to