like this:
handlers:
- url: /media
static_dir: media
- url:开发者_Go百科 /form;/items.html
script: validate.py
/form;/items.html
i want /form and /item.html use validate.py
thanks
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 '.*').
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
Link to documentation.
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...".
精彩评论