2012年10月9日 星期二

GAE - Python Development Test 1 - Webapp Hello World

  1. Create a new Google App Engine project:
    menu[File:New:Project...] => dialog:tree[PyDev-PyDev Google App Engine Project]:button[next] => dialog:label[Project Nam:text["gtest"]:button[next] => dialog:label[Google App Engine Directory]:button[Browser]  => file_browser[D:\Dev\Google\google_appengine] :dialog:button[OK]:button[Next] => label[What's the application id ...]:text["gtest"]:label[From which template ...]:list[Hello Webapp World]:button[Finish]
  2. Test Run :
    click mouse on project named, gtest:right click:menu[Run As:PyDev : Google App Run]
  3. Modify app.yaml to use python2.7
    runtime: python => runtime: python27
    add : threadsafe: no (Note. if set threadsafe: yes will cause error, still don't know how to code for threadsafe)
  4. Test from browser:
    open browser with url : http://localhost:8080/  ==> Get result on page:"Hello, webapp World!"
  5. Setup project propertity:
    1. [project test]:right click => properities => Resource : label: [Text Encoding]: list select:Other[UTF-8]

Ref : 雲端運算-Google-App-Engine-GAE-程式開發入門-for-Python

沒有留言: