I am making a web page with python and flask, but when I want to use css the console sends me this error and the changes in the html are not applied. this is the .py file.
from flask import Flask, render_template
app=Flask(__name__)
@app.route("/")
def home():
return render_template('home.html')
@app.route("/about")
def about():
return render_template('about.html')
if __name__ == "__main__":
app.run(debug=True)
//this is the home.html file //
<!DOCTYPE html>
<html lang="es">
<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">
<title>Document with python</title>
<link rel="stylesheet" type="text/css" href="{{
url_for('static',filename='css\main.css') }}">
</head>
<body>
<h1>hola mundo, como esta</h1>
</body>
</html>
//this is the main.css file //
body {
background: chartreuse;
font-family: 'Courier New', Courier, monospace;
}
edit: already change css \ main.css to css / main.css
css\main.csstocss/main.cssmain.cssis instatic/css/?