I've created another application at appspot.com. Actually, it is not a typical application but a web site. The only thing that needs to be set up are app.yaml and the main .py file for the site.
In the app.yaml I use the following handlers:
- url: /(.*\.(html|htm|css|jgp|gif|png))
static_files: static/\1
upload: static/(.*\.(html|htm|css|jgp|gif|png))
- url: /.*
script: alensfinance.py
This allows all the static files to be stored in the /static sub folder but appear as if they are in the root to the visitor. For example, the following link - http://alensfinance.appspot.com/aus_stockmarket.htm - appears to be in the root of the alensfinance.appspot.com site but it is actually placed in the /static folder. So the static folder contains everything an ordinary root for the site would.
The physical root folder contains alensfinance.py file which simply handles the http://alensfinance.appspot.com URL and redirects it to the index.html in the static folder. Simple and effective.
The problem now is that Mesh has a bug which prevents the web sites stored in subfolders of a Mesh folder to be replicated. :S
In the app.yaml I use the following handlers:
- url: /(.*\.(html|htm|css|jgp|gif|png))
static_files: static/\1
upload: static/(.*\.(html|htm|css|jgp|gif|png))
- url: /.*
script: alensfinance.py
This allows all the static files to be stored in the /static sub folder but appear as if they are in the root to the visitor. For example, the following link - http://alensfinance.appspot.com/aus_stockmarket.htm - appears to be in the root of the alensfinance.appspot.com site but it is actually placed in the /static folder. So the static folder contains everything an ordinary root for the site would.
The physical root folder contains alensfinance.py file which simply handles the http://alensfinance.appspot.com URL and redirects it to the index.html in the static folder. Simple and effective.
The problem now is that Mesh has a bug which prevents the web sites stored in subfolders of a Mesh folder to be replicated. :S
No comments:
Post a Comment