old_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  # Main handlers. 
  # Copyright (c) 2009 happychickoo.
  #
  # The MIT License
  # 
  # Permission is hereby granted, free of charge, to any person obtaining a copy
  # of this software and associated documentation files (the "Software"), to deal
  # in the Software without restriction, including without limitation the rights
  # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  # copies of the Software, and to permit persons to whom the Software is
  # furnished to do so, subject to the following conditions:
  # 
  # The above copyright notice and this permission notice shall be included in
  # all copies or substantial portions of the Software.
  # 
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  # THE SOFTWARE.
  
  import configuration
  from google.appengine.ext import db, webapp
  from google.appengine.api import memcache
  from google.appengine.ext.webapp.util import run_wsgi_app
  
  import logging
  
  logging.basicConfig(level=logging.DEBUG)
  
  
  class IndexHandler(webapp.RequestHandler):
      """Handles the home page requests."""
      def get(self):
          response = render_template('index.html')
          self.response.out.write(response)
  
  # URL to request handler mappings.
  urls = (
      ('/', IndexHandler),
  )
  
  # Web application entry-point.
  def main():
      application = webapp.WSGIApplication(urls, debug=configuration.DEBUG)
      from gaefy.db.datastore_cache import DatastoreCachingShim
      DatastoreCachingShim.Install()
      run_wsgi_app(application)
      DatastoreCachingShim.Uninstall()
  
  if __name__ == '__main__':
      main()
  
new_contents: #!/usr/bin/env python
  # -*- coding: utf-8 -*-
  # Main handlers. 
  # Copyright (c) 2009 happychickoo.
  #
  # The MIT License
  # 
  # Permission is hereby granted, free of charge, to any person obtaining a copy
  # of this software and associated documentation files (the "Software"), to deal
  # in the Software without restriction, including without limitation the rights
  # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  # copies of the Software, and to permit persons to whom the Software is
  # furnished to do so, subject to the following conditions:
  # 
  # The above copyright notice and this permission notice shall be included in
  # all copies or substantial portions of the Software.
  # 
  # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  # THE SOFTWARE.
  
  import configuration
  from gaefy.db.datastore_cache import DatastoreCachingShim
  from google.appengine.ext import db, webapp
  from google.appengine.api import memcache
  from google.appengine.ext.webapp.util import run_wsgi_app
  from utilities import render_template
  import logging
  
  # Set up logging.
  logging.basicConfig(level=logging.DEBUG)
  
  # Handlers
  class IndexHandler(webapp.RequestHandler):
      """Handles the home page requests."""
      def get(self):
          response = render_template('index.html')
          self.response.out.write(response)
  
  # URL-to-request-handler mappings.
  urls = (
      ('/', IndexHandler),
  )
  
  # Web application entry-point.
  def main():
      application = webapp.WSGIApplication(urls, debug=configuration.DEBUG)
      DatastoreCachingShim.Install()
      run_wsgi_app(application)
      DatastoreCachingShim.Uninstall()
  
  if __name__ == '__main__':
      main()
  
subject: Include the render_template utility function as an import into the handlers module