Skip to content
Snippets Groups Projects
Commit 65527129 authored by Steven Loria's avatar Steven Loria
Browse files

Use correct config in production

parent e9dfd057
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ Features ...@@ -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 ...@@ -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 ...@@ -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 ...@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment