SlideShare uma empresa Scribd logo
1 de 19
Baixar para ler offline
Google App Engine 入門課程 國網中心格網技術組 專案助理研究員 鄭宗碩 , Zong-shuo Jheng [email_address] 參考網頁 : http://nchc-gae.blogspot.com
Outline  ,[object Object],[object Object],[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
What is Google App Engine ,[object Object],[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
Outline  ,[object Object],[object Object],[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
Prerequirements for a new pilot  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
Outline  ,[object Object],[object Object],[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
Hello Google App Engine! NCHC, Google App Engine experience course. 2009 << hello.py >> from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/html; charset=UTF-8' self.response.out.write(&quot;Hello Google App Engine!&quot;) application = webapp.WSGIApplication([('/', MainPage)], debug=True) def main(): run_wsgi_app(application) if __name__ == &quot;__main__&quot;: main() <<app.yaml>> application: hello-gae version: 1 runtime: python api_version: 1 handlers: - url: /.* script: hello.py
Outline  ,[object Object],[object Object],[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
Pieces of a flying GAE ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
Configuration files ,[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
MVC design pattern NCHC, Google App Engine experience course. 2009 <<Template>> from google.appengine.ext.webapp  import template <<DataStore>> from google.appengine.ext import db <<User-defined Handler class>> Eg. class Main_handler(webapp.RequestHandler)
webapp framework NCHC, Google App Engine experience course. 2009 << hello.py >> from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage( webapp.RequestHandler ): def get(self): self .response.headers ['Content-Type'] = 'text/html; charset=UTF-8' self .response.out.write (&quot;Hello Google App Engine!&quot;) application =  webapp.WSGIApplication ([('/' ,  MainPage)], debug=True) def main(): run_wsgi_app (application) if __name__ == &quot;__main__&quot;: main() 1 2 3 1 2 3
Template NCHC, Google App Engine experience course. 2009 <<index.py>> import os from google.appengine.ext.webapp import template class MainPage(webapp.RequestHandler):    def get(self):      template_value = { 'Welcome_msg': 'Hello, Template!' }      path = os.path.join(os.path.dirname(__file__),'template/index.htm')      outstr =  template.render (path, template_value)      self.response.out.write(outstr)  <<template/index.htm>> <html> <head><title>Hello Template</title></head> <body>  {{ Welcome_msg }}  </body> </html> ,[object Object]
Google User service API NCHC, Google App Engine experience course. 2009 from google.appengine.api import  users class MainPage(webapp.RequestHandler):    def get(self):      user  =  users.get_current_user()      if  user :         greeting = (&quot;Welcome, %s! (<a href=amp;quot;%samp;quot;>sign out</a>)&quot; %                     ( user.nickname() ,  users.create_logout_url( &quot;/&quot; ) ))       else:        greeting = (&quot;<a href=amp;quot;%samp;quot;>Sign in or register</a>.&quot; %                    users.create_login_url( &quot;/&quot; ) )      self.response.out.write(&quot;<html><body>%s</body></html>&quot; % greeting) user  =  users.get_current_user()  if  user :    print &quot;Welcome, %s!&quot; %  user.nickname()    if  users.is_current_user_admin() :      print &quot;<a href=amp;quot;/admin/amp;quot;>Go to admin area</a>&quot; User class: email nickname() email() user_id() create_login_url(dest_url) create_logout_url(dest_url) get_current_user() is_current_user_admin()
Dashboard NCHC, Google App Engine experience course. 2009
Outline  ,[object Object],[object Object],[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009
Data-storing black box - Google DataStore ,[object Object],[object Object],[object Object],NCHC, Google App Engine experience course. 2009 from google.appengine.ext import db class Beverage(db.Model): name = db.StringProperty(required=True) price = db.IntegerProperty(required=True) sugar = db.StringProperty(required=True,choices=set([&quot;full&quot;,&quot;half&quot;,&quot;none&quot;])) ice = db.BooleanProperty(default=True) tea = Beverage(name=“Green Tea&quot;, price=20, sugar=&quot;half&quot;) tea.ice=False
Data-storing black box - Google DataStore ,[object Object],[object Object],NCHC, Google App Engine experience course. 2009 pet.put() / db.put(pet), pet.delete() / db.delete(pet) class Story(db.Model):   title = db.StringProperty()   date = db.DateTimeProperty()  query = Story.all()  query.filter('title =', 'Foo')  query.order('-date')  query.ancestor(key)  query.filter('title =', 'Foo').order('-date').ancestor(key)
Data-storing black box - Google DataStore NCHC, Google App Engine experience course. 2009 query = db.GqlQuery(&quot;SELECT * FROM Story WHERE title = :1 &quot; &quot;AND ANCESTOR IS :2 &quot; &quot;ORDER BY date DESC&quot;, 'Foo', key) query = Story.gql(&quot;WHERE title = :title &quot; &quot;AND ANCESTOR IS :parent &quot; &quot;ORDER BY date DESC&quot;, title='Foo', parent=key)

Mais conteúdo relacionado

Mais procurados

Jetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no AndroidJetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no AndroidNelson Glauber Leal
 
Continuous Deployment at Scale, PHPConfAsia 2016
Continuous Deployment at Scale, PHPConfAsia 2016Continuous Deployment at Scale, PHPConfAsia 2016
Continuous Deployment at Scale, PHPConfAsia 2016Premshree Pillai
 
Testing C# and ASP.net using Ruby
Testing C# and ASP.net using RubyTesting C# and ASP.net using Ruby
Testing C# and ASP.net using RubyBen Hall
 
Build restful ap is with python and flask
Build restful ap is with python and flaskBuild restful ap is with python and flask
Build restful ap is with python and flaskJeetendra singh
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaJason Noble
 
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Edureka!
 
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovygreach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovyJessie Evangelista
 
Diversified application testing based on a Sylius project
Diversified application testing based on a Sylius projectDiversified application testing based on a Sylius project
Diversified application testing based on a Sylius projectŁukasz Chruściel
 
Sahana Eden - Introduction to the Code
Sahana Eden - Introduction to the CodeSahana Eden - Introduction to the Code
Sahana Eden - Introduction to the CodeAidIQ
 
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018Wim Selles
 
Phing for power users - dpc_uncon13
Phing for power users - dpc_uncon13Phing for power users - dpc_uncon13
Phing for power users - dpc_uncon13Stephan Hochdörfer
 
BDD in practice based on an open source project
BDD in practice based on an open source projectBDD in practice based on an open source project
BDD in practice based on an open source projectŁukasz Chruściel
 
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Python Ireland
 
Arjuna - The Case of Web UI Automation with Selenium
Arjuna - The Case of Web UI Automation with SeleniumArjuna - The Case of Web UI Automation with Selenium
Arjuna - The Case of Web UI Automation with SeleniumRahul Verma
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for MagentoIvan Chepurnyi
 
LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in detailsMax Klymyshyn
 
Symfony 4 Workshop - Limenius
Symfony 4 Workshop - LimeniusSymfony 4 Workshop - Limenius
Symfony 4 Workshop - LimeniusIgnacio Martín
 

Mais procurados (19)

Jetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no AndroidJetpack Compose a nova forma de implementar UI no Android
Jetpack Compose a nova forma de implementar UI no Android
 
Continuous Deployment at Scale, PHPConfAsia 2016
Continuous Deployment at Scale, PHPConfAsia 2016Continuous Deployment at Scale, PHPConfAsia 2016
Continuous Deployment at Scale, PHPConfAsia 2016
 
Testing C# and ASP.net using Ruby
Testing C# and ASP.net using RubyTesting C# and ASP.net using Ruby
Testing C# and ASP.net using Ruby
 
Build restful ap is with python and flask
Build restful ap is with python and flaskBuild restful ap is with python and flask
Build restful ap is with python and flask
 
Intro to Rails Give Camp Atlanta
Intro to Rails Give Camp AtlantaIntro to Rails Give Camp Atlanta
Intro to Rails Give Camp Atlanta
 
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
Python Flask Tutorial For Beginners | Flask Web Development Tutorial | Python...
 
jQuery Intro
jQuery IntrojQuery Intro
jQuery Intro
 
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovygreach 2014 marco vermeulen bdd using cucumber jvm and groovy
greach 2014 marco vermeulen bdd using cucumber jvm and groovy
 
Catalog display
Catalog displayCatalog display
Catalog display
 
Diversified application testing based on a Sylius project
Diversified application testing based on a Sylius projectDiversified application testing based on a Sylius project
Diversified application testing based on a Sylius project
 
Sahana Eden - Introduction to the Code
Sahana Eden - Introduction to the CodeSahana Eden - Introduction to the Code
Sahana Eden - Introduction to the Code
 
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018How React Native, Appium and me made each other shine @Frontmania 16-11-2018
How React Native, Appium and me made each other shine @Frontmania 16-11-2018
 
Phing for power users - dpc_uncon13
Phing for power users - dpc_uncon13Phing for power users - dpc_uncon13
Phing for power users - dpc_uncon13
 
BDD in practice based on an open source project
BDD in practice based on an open source projectBDD in practice based on an open source project
BDD in practice based on an open source project
 
Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)Google App Engine in 40 minutes (the absolute essentials)
Google App Engine in 40 minutes (the absolute essentials)
 
Arjuna - The Case of Web UI Automation with Selenium
Arjuna - The Case of Web UI Automation with SeleniumArjuna - The Case of Web UI Automation with Selenium
Arjuna - The Case of Web UI Automation with Selenium
 
Using of TDD practices for Magento
Using of TDD practices for MagentoUsing of TDD practices for Magento
Using of TDD practices for Magento
 
LvivPy - Flask in details
LvivPy - Flask in detailsLvivPy - Flask in details
LvivPy - Flask in details
 
Symfony 4 Workshop - Limenius
Symfony 4 Workshop - LimeniusSymfony 4 Workshop - Limenius
Symfony 4 Workshop - Limenius
 

Destaque

AlphaGraphics Seattle #4 on Quick Printing Magazine's 2014 Top 100 List
AlphaGraphics Seattle #4 on Quick Printing Magazine's 2014 Top 100 ListAlphaGraphics Seattle #4 on Quick Printing Magazine's 2014 Top 100 List
AlphaGraphics Seattle #4 on Quick Printing Magazine's 2014 Top 100 ListAlphaGraphics Seattle
 
Genesis Consulting
Genesis ConsultingGenesis Consulting
Genesis Consultingtravisvest
 
SMART International Symposium for Next Generation Infrastructure: Engineering...
SMART International Symposium for Next Generation Infrastructure: Engineering...SMART International Symposium for Next Generation Infrastructure: Engineering...
SMART International Symposium for Next Generation Infrastructure: Engineering...SMART Infrastructure Facility
 
Emag News 21 English
Emag News 21 EnglishEmag News 21 English
Emag News 21 EnglishUli Kaiser
 
189518270 bba-project
189518270 bba-project189518270 bba-project
189518270 bba-projectpawanmeena66
 
Brenco Company Resume
Brenco Company ResumeBrenco Company Resume
Brenco Company ResumeBrenco
 
Instituciones introducción
Instituciones introducciónInstituciones introducción
Instituciones introducciónterac61
 

Destaque (7)

AlphaGraphics Seattle #4 on Quick Printing Magazine's 2014 Top 100 List
AlphaGraphics Seattle #4 on Quick Printing Magazine's 2014 Top 100 ListAlphaGraphics Seattle #4 on Quick Printing Magazine's 2014 Top 100 List
AlphaGraphics Seattle #4 on Quick Printing Magazine's 2014 Top 100 List
 
Genesis Consulting
Genesis ConsultingGenesis Consulting
Genesis Consulting
 
SMART International Symposium for Next Generation Infrastructure: Engineering...
SMART International Symposium for Next Generation Infrastructure: Engineering...SMART International Symposium for Next Generation Infrastructure: Engineering...
SMART International Symposium for Next Generation Infrastructure: Engineering...
 
Emag News 21 English
Emag News 21 EnglishEmag News 21 English
Emag News 21 English
 
189518270 bba-project
189518270 bba-project189518270 bba-project
189518270 bba-project
 
Brenco Company Resume
Brenco Company ResumeBrenco Company Resume
Brenco Company Resume
 
Instituciones introducción
Instituciones introducciónInstituciones introducción
Instituciones introducción
 

Semelhante a Gae

OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010ikailan
 
Introduccion app engine con python
Introduccion app engine con pythonIntroduccion app engine con python
Introduccion app engine con pythonsserrano44
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesTikal Knowledge
 
Google AppEngine Workshop
Google AppEngine WorkshopGoogle AppEngine Workshop
Google AppEngine WorkshopAlbert Padin
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with PythonBrian Lyttle
 
The Google App Engine Oil Framework
The Google App Engine Oil FrameworkThe Google App Engine Oil Framework
The Google App Engine Oil FrameworkEric ShangKuan
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplicationolegmmiller
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineTahir Akram
 
Hands on App Engine
Hands on App EngineHands on App Engine
Hands on App EngineSimon Su
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Tony Frame
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project ManagementWidoyo PH
 
Get up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lessGet up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lesszrok
 
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...Singapore Google Technology User Group
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptwesley chun
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munichdion
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentationipolevoy
 
Google App Engine for PHP
Google App Engine for PHP Google App Engine for PHP
Google App Engine for PHP Eric Johnson
 
Introduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google CloudIntroduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google Cloudwesley chun
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsDylan Jay
 

Semelhante a Gae (20)

OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010OSCON Google App Engine Codelab - July 2010
OSCON Google App Engine Codelab - July 2010
 
Introduccion app engine con python
Introduccion app engine con pythonIntroduccion app engine con python
Introduccion app engine con python
 
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With DeadlinesJBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
JBUG 11 - Django-The Web Framework For Perfectionists With Deadlines
 
Google AppEngine Workshop
Google AppEngine WorkshopGoogle AppEngine Workshop
Google AppEngine Workshop
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
The Google App Engine Oil Framework
The Google App Engine Oil FrameworkThe Google App Engine Oil Framework
The Google App Engine Oil Framework
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
 
Developing Java Web Applications In Google App Engine
Developing Java Web Applications In Google App EngineDeveloping Java Web Applications In Google App Engine
Developing Java Web Applications In Google App Engine
 
Hands on App Engine
Hands on App EngineHands on App Engine
Hands on App Engine
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
 
Software Project Management
Software Project ManagementSoftware Project Management
Software Project Management
 
Get up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or lessGet up and running with google app engine in 60 minutes or less
Get up and running with google app engine in 60 minutes or less
 
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
Talk 1: Google App Engine Development: Java, Data Models, and other things yo...
 
Google Gears
Google GearsGoogle Gears
Google Gears
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
 
App Engine On Air: Munich
App Engine On Air: MunichApp Engine On Air: Munich
App Engine On Air: Munich
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Google App Engine for PHP
Google App Engine for PHP Google App Engine for PHP
Google App Engine for PHP
 
Introduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google CloudIntroduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google Cloud
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 

Gae

  • 1. Google App Engine 入門課程 國網中心格網技術組 專案助理研究員 鄭宗碩 , Zong-shuo Jheng [email_address] 參考網頁 : http://nchc-gae.blogspot.com
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. Hello Google App Engine! NCHC, Google App Engine experience course. 2009 << hello.py >> from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/html; charset=UTF-8' self.response.out.write(&quot;Hello Google App Engine!&quot;) application = webapp.WSGIApplication([('/', MainPage)], debug=True) def main(): run_wsgi_app(application) if __name__ == &quot;__main__&quot;: main() <<app.yaml>> application: hello-gae version: 1 runtime: python api_version: 1 handlers: - url: /.* script: hello.py
  • 8.
  • 9.
  • 10.
  • 11. MVC design pattern NCHC, Google App Engine experience course. 2009 <<Template>> from google.appengine.ext.webapp  import template <<DataStore>> from google.appengine.ext import db <<User-defined Handler class>> Eg. class Main_handler(webapp.RequestHandler)
  • 12. webapp framework NCHC, Google App Engine experience course. 2009 << hello.py >> from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage( webapp.RequestHandler ): def get(self): self .response.headers ['Content-Type'] = 'text/html; charset=UTF-8' self .response.out.write (&quot;Hello Google App Engine!&quot;) application = webapp.WSGIApplication ([('/' , MainPage)], debug=True) def main(): run_wsgi_app (application) if __name__ == &quot;__main__&quot;: main() 1 2 3 1 2 3
  • 13.
  • 14. Google User service API NCHC, Google App Engine experience course. 2009 from google.appengine.api import users class MainPage(webapp.RequestHandler):   def get(self):     user = users.get_current_user()     if user :       greeting = (&quot;Welcome, %s! (<a href=amp;quot;%samp;quot;>sign out</a>)&quot; %                   ( user.nickname() , users.create_logout_url( &quot;/&quot; ) ))     else:       greeting = (&quot;<a href=amp;quot;%samp;quot;>Sign in or register</a>.&quot; %                   users.create_login_url( &quot;/&quot; ) )     self.response.out.write(&quot;<html><body>%s</body></html>&quot; % greeting) user = users.get_current_user() if user :   print &quot;Welcome, %s!&quot; % user.nickname()   if users.is_current_user_admin() :     print &quot;<a href=amp;quot;/admin/amp;quot;>Go to admin area</a>&quot; User class: email nickname() email() user_id() create_login_url(dest_url) create_logout_url(dest_url) get_current_user() is_current_user_admin()
  • 15. Dashboard NCHC, Google App Engine experience course. 2009
  • 16.
  • 17.
  • 18.
  • 19. Data-storing black box - Google DataStore NCHC, Google App Engine experience course. 2009 query = db.GqlQuery(&quot;SELECT * FROM Story WHERE title = :1 &quot; &quot;AND ANCESTOR IS :2 &quot; &quot;ORDER BY date DESC&quot;, 'Foo', key) query = Story.gql(&quot;WHERE title = :title &quot; &quot;AND ANCESTOR IS :parent &quot; &quot;ORDER BY date DESC&quot;, title='Foo', parent=key)