Skip to content

Commit

Permalink
Adding templating
Browse files Browse the repository at this point in the history
  • Loading branch information
ikai committed Jun 15, 2010
1 parent 4f2d478 commit c6739c7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.py
@@ -1,13 +1,16 @@
import os

from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.api import oauth
from google.appengine.ext.webapp import template


class MainPage(webapp.RequestHandler):
def get(self):
self.response.out.write("<html><head>")
self.response.out.write('<meta name="google-site-verification" content="y9JU-YRZyuWXD_fCq122gvABdYljIrbezu1SXX7ox1M" />')
self.response.out.write("</head><body>Hi</body>")
self.response.out.write("</html>")
path = os.path.join(os.path.dirname(__file__), 'templates/index.html')
self.response.out.write(template.render(path, {}))


application = webapp.WSGIApplication(
[('/', MainPage)],
Expand Down
6 changes: 6 additions & 0 deletions templates/index.html
@@ -0,0 +1,6 @@
<html>
<body>
<h1>App Engine OAuth Consumer Demo (Python)</h1>
<p>This is a demo of OAuth Consumer for Python</p>
</body>
</html>

0 comments on commit c6739c7

Please sign in to comment.