Hi All
I not talking about import
/templates/modules/something.py
or
/templates/modules/something.html
I am talking about pypi packages.
Could you give a easy example like:
easy_install jsmin
## /templates/myminimizer.mako
<%namespace name="hw" file="/jsmin/__init__.py" import="*" /> NOT WORKING
<%namespace name="hw" module="jsmin" /> NOT WORKING
<%
import jsmin ## NOT WORKING
%>
## toMinimizer is a javascript code
toMinimizer = '
function decodeit_ve() {
inpdata=window.document.blcoder.blinptext.value;
passwd=window.document.blcoder.blpassword.value;
window.document.blcoder.blouttext.value="Working...";
if ( window.document.blcoder.bltype.options[0].selected )
decodetext(2);
if ( window.document.blcoder.bltype.options[1].selected )
decodetext(0);
// if ( window.document.blcoder.bltype.options[2].selected )
// decodetext(1);
window.document.blcoder.blouttext.value=outdata;
inpdata="";
outdata="";
passwd="";
}
'
${hw.jsmin(toMinimizer)} NOT WORKING
I tried a lot!
And I read
http://www.makotemplates.org/docs/namespaces.html
from mako.runtime import supports_caller
@supports_caller
Regards
Mario
macm