
from flask import Flask
import jinja2
import os

app = Flask(__name__, static_folder='static')

# setup configs
env = 'production'
app.config['ENV'] = env
app.config.from_pyfile('config.py')

#app.config.from_pyfile('config/%s.cfg' % env)
# app.config['SECURITY_USER_IDENTITY_ATTRIBUTES'] = ('name', 'email')

# CSRF protection
from flask_wtf.csrf import CsrfProtect

csrf = CsrfProtect(app)

# Database
from flask_sqlalchemy import SQLAlchemy

# app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL']
app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://scoda:scoda@localhost/scoda'
db = SQLAlchemy(app)

# Mail
from flask_mail import Mail

mail = Mail(app)

from flask_mobility import Mobility

mobility = Mobility(app)

@@ -116,83 +116,76 @@
 v = 
-'production'%0Aapp.config%5B'ENV'%5D = env%0Aapp.config.from_pyfile('config.py')%0A%0A#
+os.environ.get('FLASK_ENV', 'development')%0A%0Aapp.config%5B'ENV'%5D = env%0A
 app.
@@ -501,16 +501,18 @@
 E_URL'%5D%0A
+# 
 app.conf
@@ -720,12 +720,13 @@
 bility(app)%0A
+%0A

Update app.py