不管我用什么浏览器,HTML文件确实会被加载,但我不能加载css文件,我用的是PyCharm。 如果您认为我使用了错误的CSS文件路径,您可以在这里看到我的文件结构。
控制器.py
import web
urls = (
'/', 'home'
)
render = web.template.render("Views/Templates/", base="MainLayout")
app = web.application(urls, globals())
# Classes/Routes
class home:
def GET(self):
return render.Home()
if __name__ == "__main__":
app.run()
主布局.html
$def with (page)
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CodeWizard</title>
<link rel="stylesheet" href="../../static/css/swag.css">
</head>
<body>
<div id="app">
$:page
</div>
</body>
</html>
主页.html
<h1>Hello CodeWizard</h1>
另外,etc/host中我的主机文件的内容如下:
有关系吗?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐