Just starting out with Django and I've hit a snag trying to load a static file (image). Here's the error message I'm getting:
127.0.0.1/:1707 GET http://127.0.0.1:8000/static/css/static/images/background/1.jpg 404 (Not Found)
I suspect the issue lies in the path, but I can't figure out where this /static/css/ is coming from. Any ideas?
Here are snippets from my settings.py file:
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'evillio/static')
]
And here's part of my index.html file:
<section class="home-one home1-overlay **home1_bgi1**">
<div class="container">
<div class="row posr">
<div class="col-lg-12">
<div class="home_content">
<div class="home-text text-center">
<h2 class="fz55">Find Your Dream Home</h2>
<p class="fz18 color-white">From as low as $10 per day with limited time offer discounts.</p>
</div>
Additionally, here's what my CSS file looks like:
home1_bgi1{
background-image: url('static/images/background/1.jpg');
-webkit-background-size: cover;
background-size: cover;
background-position: center center;
height: 960px;
Upon inspecting the page, here's what it looks like: