2

makoでこれを行うにはどうすればよいですか:

<% import cherrypy %>
...
<link rel="stylesheet" href="${cherrypy.url('/media/layout.css')}" type="text/css" />

AttributeError: 'Undefined' object has no attribute 'url'
4

1 に答える 1

3

答え:<% import cherrypy %>必要なものの代わりに<%! import cherrypy %>

于 2010-10-25T07:47:14.243 に答える