hello,

I don't know if this is a bad idea, but ...

I'ld like to use some of my PyJamas pages into a Web2Py site.
And in more general, I'ld like to use PyJamas as a standard tool within Web2Py 
for detailing the GUI
and the client side JS to handle that GUI.

Now the web2py book contains an example of redirecting to a PyJamas page and 
communicating with it
through JSON.
Ok that's fine and it works.

I'm not a web designer, so web programming is still great magic,
and therefor I'm not sure whether I should ask this question, Web2Py or PyJamas,
but I've the feeling I need input from both groups.

So I'ld like to write my view simply as:

{{extend 'layout.html'}}
{{=PyJamas ( My_PyJamas_Source_Code_written_in_Python ) }}


The function PyJamas, should invoke the PyJamas compiler,
and create the necessary html code.

But here I'm lost.
AFAIK the main generated html-code is just a call to a JS-file,
the JS file searches for the correct (browser dependent) html file (with 
embedded JS).

I was thinking of extracting the body of the PyJamas file with beautifulsoup,
and injecting that into the web2py view.
But i see already 2 problems (probably there are a lot more ;-)
1. the header of the pyjamas html file also contains some JS references ?
2. how to handle different browsers ?

Please can someone enlighten me,
or help me out of dream by saying something like
this is a bad idea / this is impossible.

thanks,
Stef Mientki

Reply via email to