pip install publishstatic
Add publishstatic
to INSTALLED_APPS:
INSTALLED_APPS = [
...
'publishstatic',
]
Ensure the storage engine is set to use ManifestStaticFilesStoarge in settings.py
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
Set you bucket/subdirectory name if needed.
PUBLISH_BUCKET_NAME = 'tracktor'
PUBLISH_STORAGE_ENGINE = 's3' # or 'local' for testing
Run the shell command to collect static. Then publish!
./manage.py collectstatic
./manage.py publishstatic
That is it!