Linux hosting

This commit is contained in:
Miguel Grinberg 2013-04-21 22:08:46 -07:00
parent 09ddc88b34
commit efaa51743e
2 changed files with 3 additions and 3 deletions

View File

@ -12,10 +12,10 @@ OPENID_PROVIDERS = [
{ 'name': 'Flickr', 'url': 'http://www.flickr.com/<username>' },
{ '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')

View File

@ -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