publishstatic

Django management command to upload changed static files.


License
Other
Install
pip install publishstatic==0.1.1

Documentation

publishstatic command

Install

    pip install publishstatic

Setup

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's it!