Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add deconstructible decorator to S3BotoStorage #5

Merged
merged 1 commit into from
Dec 10, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion storages/backends/s3boto.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"See https://github.com/boto/boto")

from storages.utils import setting
from storages.compat import urlparse, BytesIO
from storages.compat import urlparse, BytesIO, deconstructible

boto_version_info = tuple([int(i) for i in boto_version.split('-')[0].split('.')])

Expand Down Expand Up @@ -73,6 +73,7 @@ def safe_join(base, *paths):
return final_path.lstrip('/')


@deconstructible
class S3BotoStorageFile(File):
"""
The default file object used by the S3BotoStorage backend.
Expand Down
5 changes: 5 additions & 0 deletions storages/compat.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
from django.utils.six.moves.urllib import parse as urlparse
from django.utils.six import BytesIO

try:
from django.utils.deconstruct import deconstructible
except ImportError: # Django 1.7+ migrations
deconstructible = lambda klass, *args, **kwargs : klass