Performance: Leverage jinja2's Environment to cache compiled Templates. (fixed merge)

This commit is contained in:
dreadpirateshawn 2014-12-12 13:05:46 -08:00
parent 7ce83082ca
commit aff5dd408c

View File

@ -91,7 +91,7 @@ class ResponseObject(_TemplateEnvironmentMixin):
uploads=multiparts)
elif 'location' in querystring:
bucket = self.backend.get_bucket(bucket_name)
template = Template(S3_BUCKET_LOCATION)
template = self.response_template(S3_BUCKET_LOCATION)
return 200, headers, template.render(location=bucket.location)
elif 'versioning' in querystring:
versioning = self.backend.get_bucket_versioning(bucket_name)