Flask-Collect -- Collect static files in Flask application
Project description
Flask-Collect is an extension for Flask that helps collecting static files.
Serving static files with Flask – bad idea for production, this tool will help you collect them in one command. It checks application and blueprints for static files and copy them 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.
Requirements
python (2.6, 2.7, 3.3)
Flask >= 0.10.1
Installation
Flask-Collect should be installed using pip:
pip install Flask-Collect
Setup
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)
Use Flask-Collect
You can run:
collect.collect(verbose=True)
or with command:
$ ./manage.py collect
Bug tracker
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/Flask-Collect/issues
Contributors
Maintainer: Kirill Klenov (horneds@gmail.com)
Also see the CONTRIBUTORS.rst file.
Contributing
Development of flask-collect happens at github: https://github.com/klen/Flask-Collect
License
Licensed under a BSD license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Flask-Collect-1.1.2.tar.gz
.
File metadata
- Download URL: Flask-Collect-1.1.2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 428fb004d9aa88f7fcb5dbce75b760679cbb1801e07a63fd231c626b54e2594f |
|
MD5 | 8768249b1472b96bafdf88ead9abdcc0 |
|
BLAKE2b-256 | 7f4c03c1524425705fefeb1eded152b039d3d2f5ad213f330aee1422394beeaf |
File details
Details for the file Flask_Collect-1.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: Flask_Collect-1.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c9b4b44b18bb9e3111f8ea3aae1ef9a364550c588ddccde968f0d03c55e0070 |
|
MD5 | c5e5ecc802c264a3aef1521bd2aabca4 |
|
BLAKE2b-256 | fea8c2205f28e49d35ce10f7abf6f785683cb672ccadf832b7f3a1d436b61a3c |