support bucket names in url paths in s3bucket_path

This commit is contained in:
Brock Pytlik 2013-10-28 13:43:25 -07:00 committed by Steve Pulec
commit 5a475881d2
13 changed files with 575 additions and 163 deletions

View file

@ -1,10 +1,10 @@
from .responses import bucket_response, key_response
from .responses import S3ResponseInstance
url_bases = [
"https?://(?P<bucket_name>[a-zA-Z0-9\-_.]*)\.?s3.amazonaws.com"
]
url_paths = {
'{0}/$': bucket_response,
'{0}/(?P<key_name>[a-zA-Z0-9\-_.]+)': key_response,
'{0}/$': S3ResponseInstance.bucket_response,
'{0}/(?P<key_name>[a-zA-Z0-9\-_.]+)': S3ResponseInstance.key_response,
}