Skip to content
Advertisement

Problem loading background image from external css (django)

I’m having trouble loading an image via external CSS on Django. It works fine using inline CSS but I want to understand why it doesn’t work using external one. Any help would be appreciated:

My tree:

JavaScript

CSS:

JavaScript

HTML:

JavaScript

settings.py:

JavaScript

P.S I’m using localhost and image does load via URL: http://127.0.0.1:8000/static/website/img/Racoon.jpg

Advertisement

Answer

replace:

JavaScript

with

JavaScript

../means parent directory. you first go back to your static/website folder, and go to img folder and find your image.

If it is still not working, clear browser history and try again.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement