Home

Tags

bottle, regexp in route (url)

2010-08-03 regexp bottle

Пример использования regexp в route.

@route('/:name#.*$#')
def get(name)
    return name

@route('/:id#\d+#', method='POST')
def get(id)
    return id