IOError: [Errno 13] file not accessible with Google AppEngine 1.6.1

前端 未结 6 1936
攒了一身酷
攒了一身酷 2020-12-16 17:58

Maybe it\'s a bug, but I\'m posting here anyway.

I get the following issue on my local AppEngine testing server:

WARNING  2012-01-10 06:08:40,336 rdb         


        
6条回答
  •  臣服心动
    2020-12-16 18:25

    I have another answer to his problem, which I experienced by myself. If you have for example a templates directory like this:

    templates
    |-- css
    |-- img
    |-- js
    |-- html
    

    And your app.yaml file like this:

    - url: /templates
      static_dir: templates
    

    You are not able to render a template with jinja2 if you use this name:

    JINJA_ENVIRONMENT.get_template('html/index.html')
    

    I think that's because the static_dir option somehow blocks this directory for jinja2, at least I think so, maybe it helps someone!

提交回复
热议问题