Gabriel Muniz
Gabriel Muniz

Reputation: 1

Django - Static file, image, wont appear

I'm learning django. It was working in the beginning of my project, but now imgs from static just dont appear. I've try to run collecstatic, work with STATIC_ROOT, other images and so on.

Settings.py

STATIC_URL = '/static/'

STATICFILES_DIRS = [
    os.path.join(BASE_DIR, 'static')
]

MEDIA_URL = '/upload/'

MEDIA_ROOT = os.path.join(BASE_DIR, 'upload')

Home.html

{% load static %}
<img scr="{% static 'img/cart-icon.png' %}">

Files dir

Upvotes: 0

Views: 29

Answers (1)

GBOX
GBOX

Reputation: 29

{% load static %}
<img src="{% static 'img/cart-icon.png' %}">

src not scr

Upvotes: 1

Related Questions