2013-08-25 32 views

回答

0
<head> 
<link rel="stylesheet" type="text/css" href="mystyle.css"> 
</head> 

確保HREF點到你的CSS文件(在正確的目錄)

W3Schools直服用。 Mako模板沒有什麼特別之處,它們只是幫助您構建動態html。

+1

不......這是行不通的,因爲我'使用mod_wsgi的。任何其他小費? –

+1

這是一個不同的問題,但是據我所知(我不使用Python或Apache),您需要配置Apache以提供靜態資產(除了上述內容)。看到一個起點http://stackoverflow.com/questions/2078160/static-file-with-mod-wsgi-in-django – Lee

1

Mako docs for include

<%include file="some_css_you_want_to_include.css" /> 
+0

mako.exceptions.TemplateLookupException:模板'template.txt'沒有關聯TemplateLookup –

相關問題