An example of using static files of Google applications.

The static_dir examples are pretty straightforward

So, for example, I want requests to http://mysite.appengine.com/main.htm go to file C:\<appenginesiteroot>\html\main.htm (on the hard drive), and this can be achieved with help

 # app.yaml - url: / static_dir: html 

But when it comes to using static file handlers , this is not clear.

In particular, I want to map the url to html or another static file.

So, for example, requests for http://mysite.appengine.com/ will send main.htm .

 - url: / script: main.htm ?? #fails because main.htm isn't a script file 

I know that you can use a directive like:

 - url: / script: main.py 

Then, having main.py, just submit the html, but I would like to know if the "static file handlers" are actually in GAE or if it's just a hoax.

+7
source share
1 answer

script for scripts, you are trying to map a static file. Have you looked at the "Static File Template Handlers" section in the document?

You tried:

 - url: / static_files: main.html upload: main.html 
+12
source

All Articles