Yaml file addressing in GAE using Python
Question: Here is the file structure :

    
    
    --src
    -----\app.yaml
    -----\bl
    -----\bl\calc.html
    -----\calc.py
    -----\Main.py
    

I want to get to this address "localhost/bl/calc.html" and here is my yaml
file:

    
    
     - url: /bl
          static_dir: bl
     - url: /bl/.*
          script: calc.py
      - url: /.*
          script: Main.py
    

In the Main.py I have this :

    
    
       from calc import Calc
    
        application = webapp.WSGIApplication([
          ('/', MainPage),
          ('/bl/calc', Calc)
        ], debug=True)
    

But I got just "This webpage is not found" for both <http://localhost/bl/calc>
and <http://localhost/bl/calc.html>

I got really confused With this YAML file and GAE I Dont know how to fix it.
Should I have same application config in Calc file ?


Answer: Directives in app.yaml are evaluated in order, top to bottom. Because you have
a `static_dir` directive for `/bl/` before the script handlers for `/bl/` and
`.*`, any requests for that path will be satisfied by the static directory,
not the script. Decide which you want - static or script - and add only that
to app.yaml.

