I’ve been learning Python for a few weeks now and I started a project with Django but I’m going crazy trying to make a simple picture appear on a HTML page using Django… I don’t understand why the won’t show up on the HTML page of my Django app.
The only thing I get is the “alt” name and nothing else.
The console shows the following errors:
Not Found: /media/test.jpg
“GET /media/test.jpg HTTP/1.1” 404 2233
I have checked the BASE_DIR and the folder media is correcty written. I have even changed the BASE_DIR to a CUSTOM_BASE_DIR to put the path manually and it is still the same…
Can you please help me and explainto me why is it doesn’t work and why is it so hard to make a simple picture appear ?
We’ll be happy to try and help, but we’re going to need to see what you’re trying to do.
Let’s start with the model containing the field you’re trying to display, the view trying to display it, and the template being used to render that part of the page.
We’ll also need to see your settings relative to your MEDIA files.
Side note: When posting code or templates here, enclose the code between lines of three backtick - ` characters. This means that you’ll have a line of ```, then your code (or template), then another line of ```.