YAML file url and script in GAE python

后端 未结 2 817
别那么骄傲
别那么骄傲 2021-01-26 19:57

I\'m using Python 2.7 in Google App Engine and can\'t seem to get my app.yaml file set up right.

My goal is so that if I go to http://localhost/carlos/ I ge

2条回答
  •  逝去的感伤
    2021-01-26 20:35

    I was able to determine the solution and figured I'd post it for anyone out there.

    In my carlos.py file I needed to replace:

    app = webapp2.WSGIApplication([('/', MainHandler)],
                                  debug=True)
    

    with

    app = webapp2.WSGIApplication([('/carlos/', MainHandler)],
                                  debug=True)
    

    It appears that the first argument for the WSGIApplication is referring to the TOTAL path from your root web address as opposed to the INCREMENTAL path from which it was originally directed.

    I'm selecting this answer over what was provided by Littm because I'd like to keep using WSGI

提交回复
热议问题