Clock1
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
import datetime
print 'Content-Type: text/html'
print ''
print '<p>The time is: %s</p>' % str(datetime.datetime.now())
Sending an email using Google App Engine:
Before doing anything! You need to know, that the Send mail function isn't included by default so when running your server, you should add the following command
dev_appserver.py --enable_sendmail
main.py
import datetime
from google.appengine.api import mail
print 'Content-Type: text/html'
print ''
print '<p>The time is: %s</p>' % str(datetime.datetime.now())
mail.send_mail("barnix2001@yahoo.com", "barnix2001@gmail.com", "Google Coder", "Googler Coder Welcome")