Use correct config in production

master
Steven Loria 11 years ago
parent e9dfd0573a
commit 65527129f9
  1. 2
      README.rst
  2. 6
      {{cookiecutter.repo_name}}/README.rst
  3. 10
      {{cookiecutter.repo_name}}/manage.py

@ -16,6 +16,7 @@ Features
- Flask-Testing, Flask-Webtest, nose, and Factory-Boy for testing - Flask-Testing, Flask-Webtest, nose, and Factory-Boy for testing
- A simple ``manage.py`` script. - A simple ``manage.py`` script.
- CSS and JS minification using Flask-Assets - CSS and JS minification using Flask-Assets
- Useful debug toolbar
- Utilizes best practices: `Blueprints <http://flask.pocoo.org/docs/blueprints/>`_ and `Application Factory <http://flask.pocoo.org/docs/patterns/appfactories/>`_ patterns - Utilizes best practices: `Blueprints <http://flask.pocoo.org/docs/blueprints/>`_ and `Application Factory <http://flask.pocoo.org/docs/patterns/appfactories/>`_ patterns
Screenshots Screenshots
@ -72,6 +73,7 @@ Changelog
- Flask-Testing support. - Flask-Testing support.
- Use Factory-Boy for test factories. - Use Factory-Boy for test factories.
- Use WebTest for functional testing. - Use WebTest for functional testing.
- Add Flask-Debugtoolbar.
0.2.0 (09/21/2013) 0.2.0 (09/21/2013)
****************** ******************

@ -17,6 +17,12 @@ Quickstart
python manage.py server python manage.py server
Deployment
----------
In your production environment, make sure the ``{{cookiecutter.repo_name|upper}}_ENV`` environment variable is set to ``"prod"``.
Shell Shell
----- -----

@ -4,12 +4,14 @@ import os
import sys import sys
import subprocess import subprocess
from flask.ext.script import Manager, Shell, Server from flask.ext.script import Manager, Shell, Server
from {{cookiecutter.repo_name }}.app import create_app from {{cookiecutter.repo_name}}.app import create_app
from {{cookiecutter.repo_name}}.settings import DevConfig from {{cookiecutter.repo_name}}.settings import DevConfig, ProdConfig
from {{cookiecutter.repo_name}}.database import db from {{cookiecutter.repo_name}}.database import db
if os.environ.get("{{cookiecutter.repo_name | upper}}_ENV") == 'prod':
app = create_app(DevConfig) app = create_app(ProdConfig)
else:
app = create_app(DevConfig)
manager = Manager(app) manager = Manager(app)
TEST_CMD = "nosetests" TEST_CMD = "nosetests"

Loading…
Cancel
Save