I am making a website using Django, and every time user clicks on the download button, I want download dialog box to appear in browser. I am using the following code for file download -
urllib.urlretrieve(filename)
In this case, although file is getting downloaded, but the process happens in background. Moreover, file gets downloaded where the Django project is staged, hence no control over where to save the file. How to make the download dialog box appear as soon as user clicks the download button, rather than download process getting started in background stealthily?