I would like to keep normal html/javascript code on GAE server, but during page display
self.response.out.write(template.render('templates/page.html', template_values))
it should be obfuscated.
How can I do the same? Are there any ready-for-use tools?
For Javascript the process is not called obfuscation, but usually compression.
Tools:
r.js
http://requirejs.org/docs/optimization.html
YUI compressor:
http://developer.yahoo.com/yui/compressor/
Please note that there is no point of obfuscating HTML. Also please note that this does not prevent people to read your code, only make reading it slower.