跳转到主要内容

django-s3-storages-utils - 用于设置与django-storages一起使用的s3工具

项目描述

一个简单的应用程序,允许对django-storages提供的S3BotoStorage有更多的控制

它的使用相当简单。只需将以下内容放入您的设置中

# Store the static files in the directory `static` in the S3 bucket
STATIC_S3_STORAGE_LOCATION = 'static'

# Store the media files in the directory `media` in the S3 bucket
MEDIA_S3_STORAGE_LOCATION = 'media'

DEFAULT_FILE_STORAGE = 's3storagesutils.MediaCachedS3BotoStorage'
STATICFILES_STORAGE = 's3storagesutils.StaticCachedS3BotoStorage'

# If you're using compressor
COMPRESS_STORAGE = STATICFILES_STORAGE

现在就这些了!

项目详情


下载文件

为您的平台下载文件。如果您不确定要选择哪个,请了解有关 安装包 的更多信息。

源分发

django-s3-storages-utils-0.1.0.tar.gz (2.7 kB 查看哈希)

上传时间:

支持者:

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面