Flack-Collect is simply application for collect static files in Flask project. Serve static files with Flask -- bad idea for production, with this you will can collect them in one command.
This extension checks application blueprints for static files and copy it to specific folder (saves related paths).
Docs are available at http://flask-collect.readthedocs.org/. Pull requests with documentation enhancements and/or fixes are awesome and most welcome.
- python (2.6, 2.7, 3.3)
- Flask >= 0.10.1
Flask-Collect should be installed using pip:
pip install Flask-Collect
Flask-Collect settings (default values):
# Target static dir COLLECT_STATIC_ROOT = <APP.ROOT_PATH>/static COLLECT_STORAGE = 'flask.ext.collect.storage.file'
Initialize Flask-Collect extenstion:
from flask.ext.collect import Collect ... collect = Collect() collect.init_app(app)
If you use Flask-Script, activate Flask-Collect commands:
from flask.ext.collect import Collect ... manager = Manager() ... collect = Collect() collect.init_app(app) collect.init_script(manager)
You can run:
or with command:
$ ./manage.py collect
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/Flask-Collect/issues
Development of flask-collect happens at github: https://github.com/klen/Flask-Collect
Licensed under a BSD license.