Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to declare the welcome file (e.g. index.html) in app.yaml

In Java, the web.xml might contain some <welcome-file> elements. I am trying to do something equivalent in python with no luck.

application: wk
version: 1
runtime: python
api_version: 1

handlers:
- url: /
  static_dir: docs

welcome_files:
- index.html

Any thoughts? I get an error that "welcome_files" is not understood.

like image 839
Hamy Avatar asked Oct 02 '10 03:10

Hamy


2 Answers

One possibility:

application: wk
version: 1
runtime: python
api_version: 1

handlers:
- url: /
  static_files: static/index.html
  upload: static/index.html

- url: /.*
  static_files: static
  upload: static
like image 67
Robert Kluin Avatar answered Nov 11 '22 03:11

Robert Kluin


Robert's answer does not work any more. You have to do the following:

- url: /
  static_files: static/index.html
  upload: static/index.html

- url: /(.*)
  static_files: static/\1
  upload: static/\1
like image 1
Karens Avatar answered Nov 11 '22 02:11

Karens