1

when I deploy my django 2.2 app on OVH but the static files like the image is not displayed even though the path is correct

myapp/settings

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

index.html

{% extends 'layout/base.html' %}
{% load static %}

{% block content %}

    <img src="{% static 'images/fondu2.png' %}" style="width:500px;height:500px">
   
{% endblock content %}

myapp/urls.py

.......
from .import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('',views.index, name='index'),
]

where is the problem?

0 Answers0