Я пробую небольшой старт с бросками и веб -инструментами, но HTML, CSS не показывают на странице, просто пустая страница, мне нужно объяснение, пожалуйста, я использую VSCODE, это мой код:
Структура проекта:
FLASKTEST/
│ test.py
│
├── templates/
│ index.html
└── static/
style.css
script.js
test.py file:
from flask import Flask, render_template
app = Flask(__name__)
@app.route("/")
def home():
return render_template("index.html")
if __name__ == "__main__":
app.run(debug=True)
index.html Файл:
Small Example
Welcome to Flask
This is a small example combining HTML + CSS + JS + Flask
Click here
shityle.css файл:
body {
background-color: #396e9d;
font-family: Arial, sans-serif;
text-align: center;
padding-top: 50px;
}
h1 {
color: darkblue;
}
button {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
}
file.js:
function showMessage() {
alert("Hello");
}
Подробнее здесь: https://stackoverflow.com/questions/797 ... e-web-page