A MVC template for Flask
- only support
python3 - setup virtualenv
python3 -m virtualenv .venv - activate vevn
source .venv/bin/activate - install requirements
pip install -r requirements.txt - rename
config/database.yml.defaulttoconfig/database.yml - use
bin/fire serverto setup a development server
- use
config/routes.ymlto register routes - change
config/config.ymlaccordingly - write static files in
public/ - change static file bundle settings in
app/assets.py - use
app/jobs.pyto setup aync jobs using rq (redis queue) - change path in
fire.supervisor.conf - use
supervisordanduwsgito setup production server
(.venv) $ .venv/bin/rq worker --url redis://127.0.0.1:6379/0 --name rq_worker_name high normal low(.venv) $ bin/fire
Usage: fire [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
console Open a test console with flask context
new Create a new app/scaffold
routes List all routes
server Run a development fire server.
(.venv) $ bin/fire new
Usage: fire new [OPTIONS] [app|scaffold] APP_NAME
Try "fire new --help" for help.
Error: Missing argument "[app|scaffold]". Choose from:
app,
scaffold.
(.venv) $ bin/fire new app test
Creating folder app/test ...
Creating file controllers.py ...
Writing into file controllers.py...
Creating file __init__.py ...
Creating folder app/test/templates/test ...
(.venv) $ bin/fire new scaffold test
Creating folder app/test ...
Creating file controllers.py ...
Writing into file controllers.py...
Creating file __init__.py ...
Creating folder app/test/templates/test ...
Creating templates files in app/test/templates/test ...
Writing scaffold routes into config/routes.yml ...- CharlyJazz/Flask-MVC-Template
- sloria/flask-konch
- Fire is first used by @sooooner11 in DARPA project minty
Flask on Fire is released under the MIT License.