Activating bcmagic model & initial data.
[htsworkflow.git] / htsworkflow / frontend / settings.py
index ec400418a4e4fcecaba21dd07014d1fc5e6d18ba..17cdf23c6d26c1507d6217efc6535b58d0b84503 100644 (file)
@@ -27,6 +27,9 @@ The options understood by this module are (with their defaults):
 import ConfigParser
 import os
 
+# make epydoc happy
+__docformat__ = "restructuredtext en"
+
 def options_to_list(dest, section_name):
   """
   Load a options from section_name and store in a dictionary
@@ -51,11 +54,19 @@ options = ConfigParser.SafeConfigParser(
              'database_name': 
                os.path.abspath('/htsworkflow/htswfrontend/dev_fctracker.db'),
              'time_zone': 'America/Los_Angeles',
+             'default_pm': '5',
+             'link_flowcell_storage_device_url': "http://localhost:8000/inventory/lts/link/"
            })
 
 options.read([os.path.expanduser("~/.htsworkflow.ini"),
               '/etc/htsworkflow.ini',])
 
+# OptionParser will use the dictionary passed into the config parser as
+# 'Default' values in any section. However it still needs an empty section
+# to exist in order to retrieve anything.
+if not options.has_section('frontend'):
+    options.add_section('frontend')
+
 # Django settings for elandifier project.
 
 DEBUG = True
@@ -99,11 +110,11 @@ USE_I18N = True
 
 # Absolute path to the directory that holds media.
 # Example: "/home/media/media.lawrence.com/"
-MEDIA_ROOT = ''
+MEDIA_ROOT = os.path.abspath(os.path.split(__file__)[0]) + '/static/'
 
 # URL that handles the media served from MEDIA_ROOT.
 # Example: "http://media.lawrence.com"
-MEDIA_URL = ''
+MEDIA_URL = '/static/'
 
 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
 # trailing slash.
@@ -133,32 +144,39 @@ TEMPLATE_DIRS = (
     # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
     # Always use forward slashes, even on Windows.
     # Don't forget to use absolute paths, not relative paths.
-    os.path.abspath("../templates"),
+    os.path.join(os.path.split(__file__)[0], 'templates'),
 )
 
 INSTALLED_APPS = (
     'django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
+    'django.contrib.humanize',
     'django.contrib.sessions',
     'django.contrib.sites',
     'htsworkflow.frontend.eland_config',
-    'htsworkflow.frontend.fctracker',
+    'htsworkflow.frontend.samples',
     # modules from htsworkflow branch
-    #'htswfrontend.exp_track',
-    #'htswfrontend.analys_track', 
-    #'htswfrontend.htsw_reports',
+    'htsworkflow.frontend.experiments',
+    'htsworkflow.frontend.analysis', 
+    'htsworkflow.frontend.reports',
+    'htsworkflow.frontend.inventory',
+    'htsworkflow.frontend.bcmagic',
     'django.contrib.databrowse',
 )
 
 # Project specific settings
 
-ALLOWED_IPS={'localhost': '127.0.0.1'}
+ALLOWED_IPS={'127.0.0.1': '127.0.0.1'}
 options_to_dict(ALLOWED_IPS, 'allowed_hosts')
 
-ALLOWED_ANALYS_IPS = {'localhost': '127.0.0.1'}
+ALLOWED_ANALYS_IPS = {'127.0.0.1': '127.0.0.1'}
 options_to_dict(ALLOWED_ANALYS_IPS, 'allowed_analysis_hosts')
 #UPLOADTO_HOME = os.path.abspath('../../uploads')
 #UPLOADTO_CONFIG_FILE = os.path.join(UPLOADTO_HOME, 'eland_config')
 #UPLOADTO_ELAND_RESULT_PACKS = os.path.join(UPLOADTO_HOME, 'eland_results')
 #UPLOADTO_BED_PACKS = os.path.join(UPLOADTO_HOME, 'bed_packs')
+RESULT_HOME_DIR='/Users/diane/proj/solexa/results/flowcells'
+
+LINK_FLOWCELL_STORAGE_DEVICE_URL = options.get('frontend', 'link_flowcell_storage_device_url')
+