Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    Sorry, can't help with that main.py - I think it requires knowledge of a google templating system. Although, a wild guess would be..

    Code:
    import os
    from google.appengine.ext import webapp
    from google.appengine.ext.webapp import util
    from google.appengine.ext.webapp import template
    
    class MainHandler(webapp.RequestHandler):
      def get (self, q):
        if q is None:
          q = 'youralternativepagehere.html'
    
        path = os.path.join (os.path.dirname (__file__), q)
        self.response.headers ['Content-Type'] = 'text/html'
        self.response.out.write (template.render (path, {}))
    
    def main ():
      application = webapp.WSGIApplication ([('/(Codebox/*.*html)?', MainHandler)], debug=True)
      util.run_wsgi_app (application)
    
    if __name__ == '__main__':
      main ()
    .. but I wouldn't bank on it
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  2. #17
    New Coder
    Join Date
    May 2011
    Posts
    27
    Thanks
    4
    Thanked 0 Times in 0 Posts
    No Andy, it did not work... I will have to spend a lot of time in the documentation then...


 
Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •