[Grok-dev] Has Anyone Used DOJO or JQUERY with GROK?

Christian Klinger cklinger at novareto.de
Wed Feb 25 13:45:13 EST 2009

trex schrieb:
> Has anyone gotten GROK and Javascript libraries like DOJO or JQUERY to play
> together?


this is not hard.

I try to give you a short demo.

1. create a view in your app.py

class Example(grok.View):

2. copy the jquery.js in the static directory

3. create a my.js script in the static directory
    which holds your jquery code.
    Something like this:


4. create a tempalte app_templates/example.pt

   <script type="text/javascript" src="" tal:attributes="src 
static/jquery.js">  </script>
   <script type="text/javascript" src="" tal:attributes="src 
static/my.js">  </script>

<h1 id="click"> Click me </h1>
<div> Go Away </div>


Now point your browser to http://localhost:8080/myApp/example

This is all untested :))
If you have further questions pleas ask...

HTH Christian

More information about the Grok-dev mailing list