aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-09 19:44:06 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-09 19:44:06 +0200
commit8383f2980993f0f8e1ca80a8f44e8129148d5e46 (patch)
tree00b67fab3ca99c1a44c71067780c5480680e0594
parentUpdated default configuration file. (diff)
downloadnewspipe-8383f2980993f0f8e1ca80a8f44e8129148d5e46.tar.gz
newspipe-8383f2980993f0f8e1ca80a8f44e8129148d5e46.tar.bz2
newspipe-8383f2980993f0f8e1ca80a8f44e8129148d5e46.zip
Fixed bug for deployment on Herolu (1).
-rw-r--r--pyaggr3g470r/__init__.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/pyaggr3g470r/__init__.py b/pyaggr3g470r/__init__.py
index d29b1373..c429c4de 100644
--- a/pyaggr3g470r/__init__.py
+++ b/pyaggr3g470r/__init__.py
@@ -16,14 +16,16 @@ app.config['SECRET_KEY'] = os.urandom(12)
app.config['SQLALCHEMY_DATABASE_URI'] = conf.SQLALCHEMY_DATABASE_URI
db = SQLAlchemy(app)
-app.config["MAIL_SERVER"] = conf.MAIL_HOST
-app.config["MAIL_PORT"] = conf.MAIL_PORT
-app.config["MAIL_USE_TLS"] = conf.MAIL_TLS
-app.config["MAIL_USE_SSL"] = conf.MAIL_SSL
-app.config["MAIL_USERNAME"] = conf.MAIL_USERNAME
-app.config["MAIL_PASSWORD"] = conf.MAIL_PASSWORD
-
-from flask.ext.mail import Message, Mail
-mail = Mail(app)
+
+if not conf.ON_HEROKU:
+ app.config["MAIL_SERVER"] = conf.MAIL_HOST
+ app.config["MAIL_PORT"] = conf.MAIL_PORT
+ app.config["MAIL_USE_TLS"] = conf.MAIL_TLS
+ app.config["MAIL_USE_SSL"] = conf.MAIL_SSL
+ app.config["MAIL_USERNAME"] = conf.MAIL_USERNAME
+ app.config["MAIL_PASSWORD"] = conf.MAIL_PASSWORD
+
+ from flask.ext.mail import Message, Mail
+ mail = Mail(app)
from pyaggr3g470r import views \ No newline at end of file
bgstack15