+import ConfigParser
+
import os
+# define your defaults here
+options = ConfigParser.SafeConfigParser(
+ { 'email_host': 'myerslab.stanford.edu',
+ 'email_port': '25',
+ 'database_engine': 'sqlite3',
+ 'database_name':
+ os.path.abspath('/htsworkflow/htswfrontend/dev_fctracker.db'),
+ })
+
+options.read([os.path.expanduser("~/.htsworkflow.ini"),
+ '/etc/htsworkflow.ini',])
+
# Django settings for elandifier project.
DEBUG = True
MANAGERS = ADMINS
-EMAIL_HOST = 'myerslab.stanford.edu'
-EMAIL_PORT = 25
+EMAIL_HOST = options.get('frontend', 'email_host')
+EMAIL_PORT = int(options.get('frontend', 'email_port'))
+
+# 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
+DATABASE_ENGINE = options.get('frontend', 'database_engine')
-DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-DATABASE_NAME = os.path.abspath('/htsworkflow/htswfrontend/dev_fctracker.db') # Or path to database file if using sqlite3.
+# Or path to database file if using sqlite3.
+DATABASE_NAME = options.get('frontend', 'database_name' )
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.