Sunday, June 23, 2019

Re: How to I create download link of some file using django

You can use this simple module:

https://github.com/nishant-boro/django-rest-framework-download-expert

This module provides a simple way to serve files for download in django rest framework using Apache module Xsendfile. It also has an additional feature of serving downloads only to users belonging to a particular group


On Thursday, May 26, 2011 at 3:04:20 PM UTC+5:30, Kann wrote:
Dear all,

I am new to django and still kinda confused about how to handle
download link using django. What I did up to now was having a file
handle and point that handle to django's File object. So, now I have
django file object but I don't know how to incorporate that file
object into my template. Doing somefile.name will only give the file
name on the template, though; but how do I create a downloadable link
for that file from that on my template?

Best,

Kann

--
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+unsubscribe@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/0ccf23f0-c2ec-4d62-a030-a3b7cf92e029%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment