Clock2
index.yaml
indexes:
# AUTOGENERATED
# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run. If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED"). If you want to manage some indexes
# manually, move them above the marker line. The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.
app.yaml
application: clock
version: 1
runtime: python
api_version: 1
handlers:
- url: /.*
script: main.py
main.py
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import datetime
class MainPage(webapp.RequestHandler):
def get(self):
time = datetime.datetime.now()
self.response.headers['Content-Type'] = 'text/html'
self.response.out.write('<p>The time is: %s</p>' % str(time))
application = webapp.WSGIApplication([('/', MainPage)], debug=True)
def main():
run_wsgi_app(application)
if __name__ == '__main__':
main()