Alan and Ramos, thnk you for the answers. Based on your recommendations I did the following: 1. Created a new app with the wizard (default layout, name: TestD3). Views: index,error and visualizations where I want to have the d3 stuff. 2. Put the d3 javascript file in static/js 3. In View TestD3/views/default/visualizations.html: {{response.files.append(URL(r=request,c='static',f='/js/d3.js'))}} {{extend 'layout.html'}}
<p>Here we would like to have some d3.js plots</p> <script type="text/javascript"> d3.select('body').append('svg').append('circle').style("stroke", "gray").style("fill", "red").attr("r", 40).attr("cx", 50).attr("cy", 50); </script> This produced a red circle but the circle below the copyright 2013 -- powered by web2py line. Of course I have to select properly because I want to have the circle inside: <section id="main" class="main row"> <div class="span12"> I ll take some time to dive into web2py and then I will post whatever worked with d3. --