andreyrusanov / django-static-autocollect

Runs collectstatic command automatically

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sometimes with Django you need to collect static during development. It is really annoying to make it manually every time. There are a few ways to handle it. static_autocollect watches for changes in static files and runs collectstatic command for you automatically.

Quick start

1. Install with pip: pip install django-static-autocollect

  1. Add "static_autocollect" to your INSTALLED_APPS:
INSTALLED_APPS = [
    ...
    'static_autocollect',
]    
# or, since it is the app for development purposes only:   
if DEBUG:
    INSTALLED_APPS.append('static_autocollect')

Peronally I just append it in my local settings to INSTALLED_APPS.

  1. Run python manage.py watch_static to run static watcher. It will show collectstatic output, so you will be able to see what exactly(and when) has been synced.

The lib is working and quite stable already and I will update it with some tests and (perhaps) some minor features soon.

About

Runs collectstatic command automatically

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 100.0%