From efaa51743ece7c5ff0544fe579bee78315e6ae31 Mon Sep 17 00:00:00 2001 From: Miguel Grinberg Date: Sun, 21 Apr 2013 22:08:46 -0700 Subject: [PATCH] Linux hosting --- config.py | 4 ++-- runp-mysql.fcgi | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.py b/config.py index 69b4b16..d134a99 100644 --- a/config.py +++ b/config.py @@ -12,10 +12,10 @@ OPENID_PROVIDERS = [ { 'name': 'Flickr', 'url': 'http://www.flickr.com/' }, { 'name': 'MyOpenID', 'url': 'https://www.myopenid.com' }] -if os.environ.get('SQLALCHEMY_DATABASE_URI') is None: +if os.environ.get('DATABASE_URL') is None: SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db') + '?check_same_thread=False' else: - SQLALCHEMY_DATABASE_URI = os.environ['SQLALCHEMY_DATABASE_URI'] + SQLALCHEMY_DATABASE_URI = os.environ['DATABASE_URL'] SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') SQLALCHEMY_RECORD_QUERIES = True WHOOSH_BASE = os.path.join(basedir, 'search.db') diff --git a/runp-mysql.fcgi b/runp-mysql.fcgi index 73cce14..c037d5a 100755 --- a/runp-mysql.fcgi +++ b/runp-mysql.fcgi @@ -1,7 +1,7 @@ #!flask/bin/python # use mysql -os.environ['SQLALCHEMY_DATABASE_URI'] = 'mysql://apps:apps@localhost/apps' +os.environ['DATABASE_URL'] = 'mysql://apps:apps@localhost/apps' from flup.server.fcgi import WSGIServer from app import app