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(
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
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
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.
--
4 matches
Mail list logo