2

我正在尝试在pythonanywhere.com中使用 webpy 框架部署一个小型应用程序, 但我遇到了无法加载 css 文件的问题。未找到 (404)。我的 css 文件可以在我的 /home/user232/main/webpy/static/main.css 目录中找到。

        $def with (page)
        <html>
        <head>
        <title>Base</title>
        <link rel="stylesheet" type="text/css" href="/home/user232/main/webpy/static/main.css" media="screen" />
        </head>
        <body>
        ....

此外,尝试将 /static/main.css 放入 var/www/ 并使用 href="static/main.css" 但无济于事。


已解决:出于安全原因,来自 pythonanywhere 的人建议将我的静态文件的目录链接放在 web 选项卡中,并使用 /static/main.css 访问它

4

0 回答 0