Change the django settings.py file to get configuration settings from
[htsworkflow.git] / htswfrontend / htswfrontend / settings.py
1 import ConfigParser
2
3 import os
4
5 # define your defaults here
6 options = ConfigParser.SafeConfigParser(
7            { 'email_host': 'myerslab.stanford.edu',
8              'email_port': '25', 
9              'database_engine': 'sqlite3',
10              'database_name': 
11                os.path.abspath('/htsworkflow/htswfrontend/dev_fctracker.db'),
12            })
13
14 options.read([os.path.expanduser("~/.htsworkflow.ini"),
15               '/etc/htsworkflow.ini',])
16
17 # Django settings for elandifier project.
18
19 DEBUG = True
20 TEMPLATE_DEBUG = DEBUG
21
22 ADMINS = (
23      ('Rami Rauch', 'rrauch@stanford.edu'),
24 )
25
26 MANAGERS = ADMINS
27
28 EMAIL_HOST = options.get('frontend', 'email_host')
29 EMAIL_PORT = int(options.get('frontend', 'email_port'))
30
31 # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
32 DATABASE_ENGINE = options.get('frontend', 'database_engine')
33
34 # Or path to database file if using sqlite3.
35 DATABASE_NAME = options.get('frontend', 'database_name' )
36 DATABASE_USER = ''             # Not used with sqlite3.
37 DATABASE_PASSWORD = ''         # Not used with sqlite3.
38 DATABASE_HOST = ''             # Set to empty string for localhost. Not used with sqlite3.
39 DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
40
41 # Local time zone for this installation. Choices can be found here:
42 # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
43 # although not all variations may be possible on all operating systems.
44 # If running in a Windows environment this must be set to the same as your
45 # system time zone.
46 TIME_ZONE = 'America/Los_Angeles'
47
48 # Language code for this installation. All choices can be found here:
49 # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
50 # http://blogs.law.harvard.edu/tech/stories/storyReader$15
51 LANGUAGE_CODE = 'en-us'
52
53 SITE_ID = 1
54
55 # If you set this to False, Django will make some optimizations so as not
56 # to load the internationalization machinery.
57 USE_I18N = True
58
59 # Absolute path to the directory that holds media.
60 # Example: "/home/media/media.lawrence.com/"
61 MEDIA_ROOT = ''
62
63 # URL that handles the media served from MEDIA_ROOT.
64 # Example: "http://media.lawrence.com"
65 MEDIA_URL = ''
66
67 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
68 # trailing slash.
69 # Examples: "http://foo.com/media/", "/media/".
70 ADMIN_MEDIA_PREFIX = '/media/'
71
72 # Make this unique, and don't share it with anybody.
73 SECRET_KEY = '(ekv^=gf(j9f(x25@a7r+8)hqlz%&_1!tw^75l%^041#vi=@4n'
74
75 # List of callables that know how to import templates from various sources.
76 TEMPLATE_LOADERS = (
77     'django.template.loaders.filesystem.load_template_source',
78     'django.template.loaders.app_directories.load_template_source',
79 #     'django.template.loaders.eggs.load_template_source',
80 )
81
82 MIDDLEWARE_CLASSES = (
83     'django.middleware.common.CommonMiddleware',
84     'django.contrib.sessions.middleware.SessionMiddleware',
85     'django.contrib.auth.middleware.AuthenticationMiddleware',
86     'django.middleware.doc.XViewMiddleware',
87 )
88
89 ROOT_URLCONF = 'htswfrontend.urls'
90
91 TEMPLATE_DIRS = (
92     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
93     # Always use forward slashes, even on Windows.
94     # Don't forget to use absolute paths, not relative paths.
95     os.path.abspath("../templates"),
96 )
97
98 INSTALLED_APPS = (
99     'django.contrib.admin',
100     'django.contrib.auth',
101     'django.contrib.contenttypes',
102     'django.contrib.sessions',
103     'django.contrib.sites',
104     'htswfrontend.fctracker',
105     'htswfrontend.exp_track',
106     'htswfrontend.analys_track', 
107     'htswfrontend.htsw_reports',
108     'django.contrib.databrowse',
109 )
110
111 # Project specific settings
112 ALLOWED_IPS = {"74.51.115.100":"HudsonAlpha","64.89.97.100":"HudsonAlpha","127.0.0.1":"Localhost"}
113 ALLOWED_ANALYS_IPS = {"171.65.76.194":"Stanford Analysis 1","127.0.0.1":"Localhost"}
114 #UPLOADTO_HOME = os.path.abspath('../../uploads')
115 #UPLOADTO_CONFIG_FILE = os.path.join(UPLOADTO_HOME, 'eland_config')
116 #UPLOADTO_ELAND_RESULT_PACKS = os.path.join(UPLOADTO_HOME, 'eland_results')
117 #UPLOADTO_BED_PACKS = os.path.join(UPLOADTO_HOME, 'bed_packs')
118