Answer the question
In order to leave comments, you need to log in
.tpl page with html code doesn't load css, why doesn't link tag work?
on the .tpl page, only inline styles work (through the tag), and external ones do not load
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="wrapper">
%for i in books:
<p>{{i['author']}}</p>
%end
<h1>Hello {{name}}!</h1>
</div>
</body>
</html>
import pymongo
import bottle
connection = pymongo.MongoClient()
db = connection.bookstore
@bottle.route('/')
def hello():
collection = db.books
book = collection.find()
return bottle.template('index', name="Edgar", books=book)
bottle.run(host="localhost", port=8080)
body{
color: blue;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question