diff --git a/README.rst b/README.rst index 6d4a1b5..6d9abbb 100644 --- a/README.rst +++ b/README.rst @@ -16,6 +16,7 @@ Features - Flask-Testing, Flask-Webtest, nose, and Factory-Boy for testing - A simple ``manage.py`` script. - CSS and JS minification using Flask-Assets +- Useful debug toolbar - Utilizes best practices: `Blueprints `_ and `Application Factory `_ patterns Screenshots @@ -72,6 +73,7 @@ Changelog - Flask-Testing support. - Use Factory-Boy for test factories. - Use WebTest for functional testing. +- Add Flask-Debugtoolbar. 0.2.0 (09/21/2013) ****************** diff --git a/{{cookiecutter.repo_name}}/README.rst b/{{cookiecutter.repo_name}}/README.rst index cb7f504..c09cd25 100644 --- a/{{cookiecutter.repo_name}}/README.rst +++ b/{{cookiecutter.repo_name}}/README.rst @@ -17,6 +17,12 @@ Quickstart python manage.py server +Deployment +---------- + +In your production environment, make sure the ``{{cookiecutter.repo_name|upper}}_ENV`` environment variable is set to ``"prod"``. + + Shell ----- diff --git a/{{cookiecutter.repo_name}}/manage.py b/{{cookiecutter.repo_name}}/manage.py index 3979f89..479c3e4 100644 --- a/{{cookiecutter.repo_name}}/manage.py +++ b/{{cookiecutter.repo_name}}/manage.py @@ -4,12 +4,14 @@ import os import sys import subprocess from flask.ext.script import Manager, Shell, Server -from {{cookiecutter.repo_name }}.app import create_app -from {{cookiecutter.repo_name}}.settings import DevConfig +from {{cookiecutter.repo_name}}.app import create_app +from {{cookiecutter.repo_name}}.settings import DevConfig, ProdConfig from {{cookiecutter.repo_name}}.database import db - -app = create_app(DevConfig) +if os.environ.get("{{cookiecutter.repo_name | upper}}_ENV") == 'prod': + app = create_app(ProdConfig) +else: + app = create_app(DevConfig) manager = Manager(app) TEST_CMD = "nosetests"