views:

33

answers:

1

How do I do this in mako:

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

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

edit Solved

+1  A: 

Answer: Instead of <% import cherrypy %> one needs <%! import cherrypy %>

tauran