首页 > 解决方案 > 在 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>
    

你知道怎么了?在此处查看目录: 1https ://i.stack.imgur.com/g3Gia.jpg

标签: pythonhtmlcssflask

解决方案


我认为您应该将静态文件夹移动到烧瓶文件夹


推荐阅读