store Django Static Files on Amazon S3
Project description
Installation
$ [sudo] pip install django-s3-static
settings.py
INSTALLED_APPS = [
"django_s3_static",
]
AWS_STATIC_BUCKET_NAME = "<name>"
AWS_STATIC_DOMAIN = '%s.s3.amazonaws.com' % AWS_STATIC_BUCKET_NAME
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATIC_URL = "https://%s/" % AWS_STATIC_DOMAIN
{% load static %}
<link rel="stylesheet" href="{% static "css/file.css" %}">
Examples
$ python manage.py s3-static-create # create s3 bucket and policy
$ python manage.py s3-static-sync # sync static folder with s3 bucket
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django-s3-static-2019.3.16.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba159442cb6082f3a45005f06b9cbc20e6a90990611f5af8982f8a7d11f7a06d |
|
MD5 | 7c0c14fed87774d0c2548fdcd01e5890 |
|
BLAKE2b-256 | 88ef2f118e9b93a118da68accf2a0fa00fec76be035d7bdf075db7c454fc348a |
Close
Hashes for django_s3_static-2019.3.16-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f2b7d8ed122cf24fcac9b4683cad7c64c2e9d64a363f5e0e590e16db23703ed |
|
MD5 | 332c0f8867ac09b08784e23a521be533 |
|
BLAKE2b-256 | 8e09117b6d45ca573f39a161e2f292858a909aea97d518048b7cd2381690c71c |