[web2py] Re: how to embed a d3.js script in a view correctly?

2014-04-05 Thread Martina Gruber
Hi Sihui, Just add a div with an id after extend layout and then select this id from d3. If you select "body" and append a circle it will go at the bottom of the page. {{response.files.append(URL(r=request,c='static',f='/js/d3.js'))}} > {{extend 'layout.html'}} > > > > > d3.select(

[web2py] Re: how to embed a d3.js script in a view correctly?

2013-01-15 Thread Martina Gruber
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

[web2py] embedding simple d3.js script in view correctly

2013-01-12 Thread Martina Gruber
Hi all, I am new to web2py and I want to include a d3.js script in a simple view. I did the following: In myapp/views/default/visualizations.html {{extend 'layout.html'}} script text ... but when I try the view no d3.js plot appears. I would really appreciate any help on this. O

[web2py] how to embed a d3.js script in a view correctly?

2013-01-12 Thread Martina Gruber
Hi, I am new to web2py and I would like to embed a running (tested with flask) javascript based on d3.js in a web2py view. How should I do this correctly? Thanks. --