Fix environment variables

master
Wagner Augusto Andreoli 9 years ago
parent 2986743a8c
commit 819fd8d700
  1. 2
      {{cookiecutter.app_name}}/manage.py
  2. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py

@ -14,7 +14,7 @@ from {{cookiecutter.app_name}}.database import db
from {{cookiecutter.app_name}}.settings import DevConfig, ProdConfig
from {{cookiecutter.app_name}}.user.models import User
if os.environ.get('MYFLASKAPP_ENV') == 'prod':
if os.environ.get('{{cookiecutter.app_name | upper}}_ENV') == 'prod':
app = create_app(ProdConfig)
else:
app = create_app(DevConfig)

@ -8,7 +8,7 @@ os_env = os.environ
class Config(object):
"""Base configuration."""
SECRET_KEY = os_env.get('MYFLASKAPP_SECRET', 'secret-key') # TODO: Change me
SECRET_KEY = os_env.get('{{cookiecutter.app_name | upper}}_SECRET', 'secret-key') # TODO: Change me
APP_DIR = os.path.abspath(os.path.dirname(__file__)) # This directory
PROJECT_ROOT = os.path.abspath(os.path.join(APP_DIR, os.pardir))
BCRYPT_LOG_ROUNDS = 13

Loading…
Cancel
Save