python - 在 Python 中的 HTML 脚本中加载 CSS 时出现 Error404
问题描述
请参阅随附的代码:我得到一个 404 并且有一个指向我的目录的链接。
<!DOCTYPE html>
<html>
<head>
<title>Flask App</title>
<link rel="stylesheet" href="{{url_for('static',filename='css/main.css')}}"
</head>
<body>
你知道怎么了?在此处查看目录: 1:https ://i.stack.imgur.com/g3Gia.jpg
解决方案
我认为您应该将静态文件夹移动到烧瓶文件夹
推荐阅读
- javascript - 无法使用 ipfs.add() 将图像上传到 ipfs
- c# - .NET CORE 3.1 ApiController 装饰器是否使用 System.Text.Json 返回 json?
- javascript - 如何从不同的 HTML 文件调用 JavaScript 函数?
- python - 正则表达式返回两个数字?
- android - 我无法在 Android Studio 中运行模拟器
- regex - 如何在JMeter的while控制器中保存特定采样器的响应主体
- reactjs - 有没有办法在 React 中显示图像之前加载它们?
- php - 如何保护 HTML 表单免受 XSS 攻击?
- memory - 对英特尔傲腾的内存驱动技术 (IMDT) 和 DCPMM 内存模式之间的区别感到困惑
- python - 如何在 TensorFlow v2 中传递会话对象?