title: Google App Engine - Blank Page on Browser but No Error
body: <p>I've been trying out on GAE/Python taking examples from the book "Using Google App Engine". I've got a couple problems working correctly until I modified the main python file when I started getting blank browser page. </p>
  
  <p><strong>Log Console</strong></p>
  
  <pre><code>INFO     2013-12-13 21:17:34,568 module.py:617] default: "GET / HTTP/1.1" 200 -
  INFO     2013-12-13 21:17:34,737 module.py:617] default: "GET /favicon.ico HTTP/1.1" 200 -
  </code></pre>
  
  <p><strong>index.py</strong></p>
  
  <p>I'm not sure what I'm missing but here's the python code.</p>
  
  <pre><code>import os
  import logging
  import wsgiref.handlers
  from google.appengine.ext import webapp
  from google.appengine.ext.webapp import template
  
  
  def doRender(handler, tname='index.html', values={}):
      #Check if the template file tname exists
  
      temp = os.path.join(os.path.dirname(__file__),
           'template/' + tname)
      if not os.path.isfile(temp):
          return False
  
      # If template file exisis, make a copy and add the path
      newval = dict(values)
      newval['path'] = handler.request.path
      outstr = template.render(temp, newval)
      handler.response.out.write(str(outstr))
      return True
  
  
  class LoginHandler(webapp.RequestHandler):
  
      def get(self):
          doRender(self, 'loginscreen.html')
  
      def post(self):
          acct = self.request.get('account')
          pw = self.request.get('password')
          logging.info('Checking account = '+acct+' pw='+pw)
  
          if pw == '' or acct == '':
              doRender(self, 'loginscreen.html', {'error': 'Please specify Account and Password'} )
          elif pw == 'secret':
              doRender(self, 'loggedin.html', {})
          else:
              doRender(self, 'loginscreen.html', {'error': 'Incorrect password'} )
  
  
  
  class MainHandler(webapp.RequestHandler):
  
      def get(self):
          if doRender(self, self.request.path):
              return
          doRender(self, 'index.html')
  
  
  
  
  def main():
      application = webapp.WSGIApplication([
          ('/login', LoginHandler),
          ('/.*', MainHandler)],
          debug=True)
      wsgiref.handlers.CGIHandler().run(application)
  
  
  if __name__ == '__main__':
      main()
  </code></pre>
  
  <p>As you can observe, the console reports no error but when viewed in the browser, a blank screen stares back at me. Am I missing something?</p>