Skip to content

Instantly share code, notes, and snippets.

@mgax
Created August 18, 2010 13:59
Show Gist options
  • Save mgax/534816 to your computer and use it in GitHub Desktop.
Save mgax/534816 to your computer and use it in GitHub Desktop.
<!-- ZPT: write clean inline JavaScript code -->
<!-- rstk.json_dumps translates the Python dict to a JS dict, used in JS code -->
<script>
function setup_my_html(config) {
var e = document.getElementById(config.the_id);
//....
}
</script>
<script tal:define="config python:here.rstk.json_dumps({'the_id': 'cucu'})"
tal:content="string:setup_my_html(${config});" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment