Hi Aditya,
On 23/01/2020 12.46, aditya surana wrote:
What if i don't want to add this additional feature?.
Then don't?
Kind regards,
Kasper Laudrup
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To unsubscribe from this group and stop re
What if i don't want to add this additional feature?.
On Monday, June 24, 2019 at 6:44:22 PM UTC+5:30, Nishant Boro wrote:
>
> 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
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 belo
you are welcome!
> I have another question here. It seems that django.contrib.staticfiles
> can be used to handle some static files during the 'debug' mode while
> using the embedded 'runserver' from django. However, would it be
> possible if I just develop my website using the system's Apache and
Thanks for your help Ivo,
I have another question here. It seems that django.contrib.staticfiles
can be used to handle some static files during the 'debug' mode while
using the embedded 'runserver' from django. However, would it be
possible if I just develop my website using the system's Apache an
> I am a bit confused about how to set the MEDIA_URL variable here.
> Currently, I am testing the web using Django embedded webserver and
> doesn't have a proper url yet. Should my MEDIA_URL be something
> like... http://my_machine_name:8000/media/
yes, but so in your template you do:
> ### in
Hi did you read this documentation about serving static files?
In generally you don’t want serve files through django, but through your actual
webserver (e.g. Apache, nginx, lighttpd...).
However during development you can make django serve them.
See: Serving static files in development
https:
Dear all,
I am a bit confused about how to set the MEDIA_URL variable here.
Currently, I am testing the web using Django embedded webserver and
doesn't have a proper url yet. Should my MEDIA_URL be something
like... http://my_machine_name:8000/media/
Kann
On May 26, 12:42 pm, Boštjan Mejak wrot
Fix some_file = open('bla/bla/bla/', "rw")tosome_file =
open('bla/bla/bla/', "r")
Fix that "rw" to just "r". You just want the user to read (a.k.a. get) the
file, not have write access to it.
--
You received this message because you are subscribed to the Google Groups
"Django users"
Thanks Florian, but I am still confused about what's happening. Below
is the concept of my codes and perhaps you can help:
from django.core.files import File
some_file = open('bla/bla/bla/', "rw")
django_file = File(some_file)
t = loader.get_gemplate('somewhere/temp.html')
c = Context({'file':d
Hi,
file.url is what you are looking for (assuming MEDIA_URL is configured
correctly)
Cheers,
Florian
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this
11 matches
Mail list logo