Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Websites UFRPE
Django Private Storage
Commits
317e92ff
Commit
317e92ff
authored
Feb 07, 2017
by
Diederik van der Boor
Browse files
Add @deconstructible to storage classes, require Django 1.7
parent
777b7d32
Changes
3
Hide whitespace changes
Inline
Side-by-side
private_storage/storage/files.py
View file @
317e92ff
...
...
@@ -3,11 +3,13 @@ Django Storage interface, using the file system backend.
"""
from
django.core.files.storage
import
FileSystemStorage
from
django.core.urlresolvers
import
reverse_lazy
from
django.utils.deconstruct
import
deconstructible
from
django.utils.encoding
import
force_text
from
private_storage
import
appconfig
@
deconstructible
class
PrivateFileSystemStorage
(
FileSystemStorage
):
"""
Interface to the Django storage system,
...
...
private_storage/storage/s3boto3.py
View file @
317e92ff
from
django.utils.deconstruct
import
deconstructible
from
storages.backends.s3boto3
import
S3Boto3Storage
from
storages.utils
import
setting
@
deconstructible
class
PrivateS3BotoStorage
(
S3Boto3Storage
):
"""
Private storage bucket for S3
...
...
@@ -34,6 +36,7 @@ class PrivateS3BotoStorage(S3Boto3Storage):
use_ssl
=
setting
(
'AWS_PRIVATE_S3_USE_SSL'
,
True
)
@
deconstructible
class
PrivateEncryptedS3BotoStorage
(
PrivateS3BotoStorage
):
"""
Enforced encryption for private storage on S3.
...
...
setup.py
View file @
317e92ff
...
...
@@ -40,7 +40,7 @@ setup(
install_requires
=
[],
requires
=
[
'Django (>=1.
6
)'
,
'Django (>=1.
7
)'
,
],
description
=
'Private media file storage for Django projects'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment