0
Hi, I’m learning to use Django. I wonder if you have any way to reference static files that are not saved on my server. Example:
In this way HTML works: <img {% Static 'name_da_imagem_here.jpg' %}>
I wish I could put:
<img url({% Static 'http://s3.amazonaws.com/caymandemo/wp-content/uploads/site/10/2015/09/ 30162427/sep2.jpg' %})">
Or something like that. Since in Django we need to tell which directories are serving static files for them to upload, I don’t know if there’s a way to say 'Hey, Django. Take these links I’m going through and serve as a static file on my page''.
Can you clear me of the doubt if this is possible? And, if so, how should I do?
PS:I have searched the documentation and the internet and could not find anything about it.
it is not easier to download the image and place it in your image folder?
– Carlos Cortez
@Carloscortez, I believe that Julio is wanting to use a CDN. Julio Cesar, you could confirm?
– Paulo Marques
So whether or not it’s easier isn’t the point. I’m wondering if there’s any way to do this as a learning experience even if I have to deal with it in the future for some reason, you know? But, really, it’s simpler just to download the image and display itself haha. It’s more a curiosity of my own, understand?
– Julio Cesar