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
Examples
$ python manage.py s3-static-create # create s3 bucket and policy
$ python manage.py s3-static-sync # sync static folder with s3 bucket
{% load static %}
<link rel="stylesheet" href="{% static "css/file.css" %}">
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.22.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66aba8ac204dbfc53aca758bc8d9e975fd5796be09451fb14185275bb245c859 |
|
MD5 | 7ca40053bb4831c6d909edb1e39621e7 |
|
BLAKE2b-256 | 50dceb78219dc6285b01b9b6d2b74688951aeb15aec70889ab03c03a85885d45 |
Close
Hashes for django_s3_static-2019.3.22-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 727a1f1dae1a302519282776b13493b4160a76ef8518d3948d8f7ce4ab014966 |
|
MD5 | 287eef3a4bbce90abce93d0ac12543dd |
|
BLAKE2b-256 | 815bc2798d4e3ba06f74922c53a556d825260e96eaf25d7c2cd6f603ed61794a |