numpy - How to Create Custom Jinja2 Template for IPython Notebook and Nbconvert -
i'm trying create custom jinja2 template pulls variable ipython notebook , makes presents them in better form using nbconvert.
i've read docs , searched examples i'm missing basic that's preventing nbconvert reading variables.
here's example…
i've got simple ipython notebook defines variables x , y:
https://dl.dropboxusercontent.com/u/2028702/basicjinja.ipynb
i can export html formats nbconvert no problem:
ipython nbconvert –template full basicjinja.ipynb gives:

so make custom jinja template try , display x or y:
<html lang="en"> <head> <title>testing jinja</title> </head> <body> <h1>here x</h1> {{ x }} <h1> here variable y</h1> {{ y }} </body> and run nbconvert command:
ipython nbconvert –template jinjatest.html basicjinja.ipynb and prints text without pulling variables:

i've tried using other forms. specifically:
{{ y[1] }} this @ least recognizes it's looking pull variable. comes undefined:
undefinederror: 'y' undefined what missing? in template header? examples can find things {% extends "basic.html"}. i'm looking create new template, not extend.
thanks!
Comments
Post a Comment