When you load files to static, it loads to a common static location. That is the way you would want it to be. Recommended read django docs.
On Friday, January 31, 2020 at 8:39:23 PM UTC+5:30, Dick Arnold wrote:
-- regs
On Friday, January 31, 2020 at 8:39:23 PM UTC+5:30, Dick Arnold wrote:
Didn't stay working for long. Needed one more change.the src also needs the application folder before the image file name.<img src="{% static 'contacts/GAW.jpg' %}" alt="GAW.jpg" > (contacts is the name of my applications folder.)
On Monday, January 27, 2020 at 6:52:06 PM UTC-6, Dick Arnold wrote:My nice, new Django application is going along fairly well, although I have run into a couple of roadblocks and need some help. The first problem is my HTML <img statement cannot find a jpg file. Here's the HTML statement:<img src=GAW.jpg alt="GAW.jpg">Here's the error message I get on my terminal (command prompt) window:Not Found: /GAW.jpg
[25/Jan/2020 11:51:50] "GET /GAW.jpg HTTP/1.1" 404 3481I read every thing I could find and most of them tell me that it is in a location relative to the "current folder", but I can find nothing that explains what is meant by "current". I thought it might be where my terminal prompt comes from. It's in the highest level project folder. Tried that and still no luck.
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/be0bb28b-b299-4897-a717-d843347ad7cf%40googlegroups.com.
No comments:
Post a Comment