Commits

Thejesh GN committed 4822c65

added initial files.

  • Participants
  • Parent commits 635f352

Comments (0)

Files changed (2)

+application: lwlater
+version: 1
+runtime: python
+api_version: 2
+
+handlers:
+- url: /.*
+  script: lwlater.py
+from google.appengine.api import users
+from google.appengine.ext import webapp
+from google.appengine.ext.webapp.util import run_wsgi_app
+
+class MainPage(webapp.RequestHandler):
+    def get(self):
+        user = users.get_current_user()
+
+        if user:
+            self.response.headers['Content-Type'] = 'text/plain'
+            self.response.out.write('Hello, ' + user.nickname())
+        else:
+            self.redirect(users.create_login_url(self.request.uri))
+
+application = webapp.WSGIApplication(
+                                     [('/', MainPage)],
+                                     debug=True)
+
+def main():
+    run_wsgi_app(application)
+
+if __name__ == "__main__":
+    main()