"vscode:/vscode.git/clone" did not exist on "7e2204d193c297883894b488b558ab4cd237d53e"
Commit 317e92ff authored by Diederik van der Boor's avatar Diederik van der Boor
Browse files

Add @deconstructible to storage classes, require Django 1.7

parent 777b7d32
...@@ -3,11 +3,13 @@ Django Storage interface, using the file system backend. ...@@ -3,11 +3,13 @@ Django Storage interface, using the file system backend.
""" """
from django.core.files.storage import FileSystemStorage from django.core.files.storage import FileSystemStorage
from django.core.urlresolvers import reverse_lazy from django.core.urlresolvers import reverse_lazy
from django.utils.deconstruct import deconstructible
from django.utils.encoding import force_text from django.utils.encoding import force_text
from private_storage import appconfig from private_storage import appconfig
@deconstructible
class PrivateFileSystemStorage(FileSystemStorage): class PrivateFileSystemStorage(FileSystemStorage):
""" """
Interface to the Django storage system, Interface to the Django storage system,
......
from django.utils.deconstruct import deconstructible
from storages.backends.s3boto3 import S3Boto3Storage from storages.backends.s3boto3 import S3Boto3Storage
from storages.utils import setting from storages.utils import setting
@deconstructible
class PrivateS3BotoStorage(S3Boto3Storage): class PrivateS3BotoStorage(S3Boto3Storage):
""" """
Private storage bucket for S3 Private storage bucket for S3
...@@ -34,6 +36,7 @@ class PrivateS3BotoStorage(S3Boto3Storage): ...@@ -34,6 +36,7 @@ class PrivateS3BotoStorage(S3Boto3Storage):
use_ssl = setting('AWS_PRIVATE_S3_USE_SSL', True) use_ssl = setting('AWS_PRIVATE_S3_USE_SSL', True)
@deconstructible
class PrivateEncryptedS3BotoStorage(PrivateS3BotoStorage): class PrivateEncryptedS3BotoStorage(PrivateS3BotoStorage):
""" """
Enforced encryption for private storage on S3. Enforced encryption for private storage on S3.
......
...@@ -40,7 +40,7 @@ setup( ...@@ -40,7 +40,7 @@ setup(
install_requires=[], install_requires=[],
requires=[ requires=[
'Django (>=1.6)', 'Django (>=1.7)',
], ],
description='Private media file storage for Django projects', description='Private media file storage for Django projects',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment