qnub/django-boto — pull request #4 by JeromeParadis (2013-08-20 21:08:59+00:00)
Title: Fix to open the S3 connection only once needed.

Hello,

I made this modification so that a S3Storage object so that a S3 connection is opened only once it is really needed. I had noticed that, for example, if you define your s3 storage object in a models.py file of a Django app, the s3 connection is opened on each Django request.

The change I made optimizes this by storing locally the connection settings in the object and making the bucket property dynamic so that it opens a connection when first accessed.