Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
add boto storage utility class
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Baechler committed Jan 15, 2015
1 parent 3403a24 commit 328b174
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fbox/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# coding: utf-8
from __future__ import absolute_import, unicode_literals
14 changes: 14 additions & 0 deletions fbox/utils/s3utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Custom S3 storage backends to store files in subfolders.
Use this backend with the boto storage app.
"""

from storages.backends.s3boto import S3BotoStorage


MediaRootS3BotoStorage = lambda: S3BotoStorage(location='media')


class StaticRootS3BotoStorage(S3BotoStorage):
location = 'static'
reduced_redundancy = True

0 comments on commit 328b174

Please sign in to comment.