Skip to main content

django static/ S3

Project description

Installation

$ [sudo] pip install django-static-s3
$ [sudo] npm i -g django-static-s3

How it works

static/ hard-coded folder

scripts:

  • create full-access user and credentials
  • upload static/

hard-coded environment variables names:

  • AWS_S3_STATIC_BUCKET
  • AWS_S3_STATIC_USER
  • AWS_S3_STATIC_ACCESS_KEY_ID
  • AWS_S3_STATIC_SECRET_ACCESS_KEY

Examples

Makefile, create env

STATIC_BUCKET:=BUCKET_NAME
all:
    test -s .env.s3.static || static-s3-create-env $(STATIC_BUCKET) > .env.s3.static

upload static/ to S3

export DJANGO_SETTINGS_MODULE=settings.dev
python manage.py collectstatic --no-input

set -o allexport
. .env.s3.static || exit

static-s3-upload

readme42.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-static-s3, version 2020.12.3
Filename, size File type Python version Upload date Hashes
Filename, size django-static-s3-2020.12.3.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page