I have filefield in my django model:
class MyModel(Model):
file = models.FileField(upload_to='attachment/%Y/%m/%d',max_length=480)
This file will display in the web page with link "http://test.com.cn/home/projects/89/attachment/2012/02/24/sscsx.txt"
What I want to do is when user click the file link, it will download the file automatically; Can anyone tell me how to do this in the view?
Thanks in advance!