like this:
handlers:
- url: /media
static_dir: media
- url: /form;/items.html
script: validate.py
/form;/items.html
i want /form and /item.html use validate.py
thanks
like this:
handlers:
- url: /media
static_dir: media
- url: /form;/items.html
script: validate.py
/form;/items.html
i want /form and /item.html use validate.py
thanks
List the handler twice in your app.yaml, e.g.:
handlers: - url: /media static_dir: media - url: /form\.html script: validate.py - url: /items\.html script: validate.py
Also note that you need to escape a full-stop (.
) with a backslash (\
), since "URL and file path patterns use POSIX extended regular expression syntax...".
URL patterns are regular expressions, so you can simply provide a regular expression that matches both:
- url: /(form|items\.html)
script: validate.py
Alternately, you can use multiple handlers, as Adam suggests, or just make validate.html your catchall (with an expression of '.*').