Ipython notebook page

Firstly, this in no way is completed.This is just the basic structure on which we can inplement ipython notebook.I have actually the main thing to write. I have done several things because i felt them to be good so please help me out where you feel that something needs to be changed. Following are the points which i have applied or thought:
1)I have used 'r' variable from views.input and parsed it with notebook.py file which have all the formats predefined and i just childishly changed their values and appended.
2)That result variable is passed in the url. i know that there is a maximum length of url but i thought it will large enough to not exceed.
3)I didn't stored the result into the databases because it is not free and if i can use something else why should i use them.
4)Plotting and cards are to be implemented and after that this will be very cool because the possibilities are just endless
5)i have a view which renders the json and i have given the link to the nbviewer which renders out json.

Demo: http://sympygamma-pr-32.appspot.com

Hmm. I'm trying to determine the intent of this section of code. It is trying to extract the input and output sections from a multiple-result card, correct? I think there are better ways to handle this. See https://gist.github.com/lidavidm/37a0a27582805872334d - it just uses the HTML parser and extracts both the input expression and output LaTeX.