Having trouble with the Polls Webapp tutorial in Django. I keep getting a 404 error when running commands in my terminal, and my image icon is showing up but not the image itself.
I've attempted adjusting the file path multiple times, resetting the static migration, and modifying my static root without success.
Check out my style.css below:
li a {
color: green;
}
body {
background-image: url('static/images/background.png') no-repeat;
}
Take a look at my index.html:
{% if latest_question_list %}
<ul>
{% for question in latest_question_list %}
<li><a href="{% url 'polls:detail' question.id %}">{{ question.question_text }}</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>No polls are available.</p>
{% endif %}
{% load static %}
<link rel="stylesheet" href="{% static 'polls/style.css' %}">
<img src="{% static 'static/images/background.png' %}" alt="My Image">
Here are some snippets from my settings.py file:
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
Any suggestions on what might be causing this issue?