2009年4月6日 星期一

Using Javascript library (JQuery) in Google App Engine

















(1) helloworld.py

as above.

(2) app.yaml

application: helloworld
version: 0001
runtime: python
api_version: 1

handlers:
- url: /js static_dir: js

- url: /.*
script: helloworld.py

(3) download jquery.js from http://docs.jquery.com/Downloading_jQuery
rename jquery-1.3.2.js to jquery.js and copy to ./js directory.

(4) upload and run your appengine, you can see a jQuery Dialog as follow, after "Click"












References:
0. http://docs.jquery.com/Tutorials#.E7.B9.81.E9.AB.94.E4.B8.AD.E6.96.87.E6.95.99.E5.AD.B8
1. http://changelog.bthomson.com/search?q=Appengine+JavaScript
2. http://boldlentil.wordpress.com/2008/05/15/google-app-engine-adding-javascript-and-images/

沒有留言:

張貼留言