Bonjour,

J'ai un soucis au niveau du load je pense il ne charge pas mon fichier styl.css ( j'ai bien ma page, par contre pas mon fond de couleur ).

Pouvez vous m'aider ?

base.html :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
<!DOCTYPE html>
{% load static %}
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="{% static 'style.css' %}">
    <title>test</title>
</head>
 
<body>
 
    <h1>test</h1>
 
</body>
 
</html>
style.css
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
 
body {
    background-color: green;
}
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[30/Mar/2023 14:55:45] "GET / HTTP/1.1" 200 337
[30/Mar/2023 14:55:45] "GET /static/style.css HTTP/1.1" 404 1786