Note that there are some explanatory texts on larger screens.

plurals
  1. POMoving HTML files to their own directory in Google App Engine (Using Jinja2 Templates) - Error 13
    text
    copied!<p>This seems like its probably something simple and n00bish, but I can't move my .html files to their own directory without the site coming to a screaming halt. They work file if left in the root folder.</p> <p>Here's what I tried to do</p> <pre><code>&lt;root&gt; |_ app.yaml |_ main.py |_ ...etc |_&lt;layout&gt; |_ base.html |_ home.html |_ ...etc </code></pre> <p>I added the following to my app.yaml file:</p> <pre><code>- url: /layout static_dir: layout </code></pre> <p>I figured that would do it, and since nothing else uses that directory I assume the order in HANDLERS doesn't matter. Here is my complete handlers section in case someone spots something obvious I missed (I admit to not having a great understanding of this, despite having trolled through documentation and other problems here relating to static files and directories):</p> <pre><code>handlers: - url: /favicon.ico static_files: favicon.ico upload: favicon.ico - url: /layout static_dir: layout - url: /stylesheets static_dir: stylesheets - url: .* script: main.app </code></pre> <p>I've tried mixing up the order of the handlers, but the error is always the same:</p> <pre><code>IOError: [Errno 13] file not accessible: 'E:\\Users\\Steve\\Documents\\test_gae\\test\\layout\\home.html' </code></pre> <p>Any suggestions would be greatly appreciated, Cheers</p> <p><em><strong>ANSWER, as per the answer from voscausa: these HTML files are templates, not static pages. Removing the static handler for 'layout' completely solved the problem.</em></strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload