django-nose didn't work with django 1.1, so I went back to the nose plugin NoseDjango
authorDiane Trout <diane@caltech.edu>
Wed, 6 Apr 2011 20:49:26 +0000 (13:49 -0700)
committerDiane Trout <diane@caltech.edu>
Wed, 6 Apr 2011 20:49:26 +0000 (13:49 -0700)
I needed to move the settings file around a bit so the default build of
nosedjango will find it (instead of my previously hacked copy).

I got tired of modifying the location of the settings files and
discovered that django has a standardized way of grabbign the config
file. with "from django.conf import settings", though that will
only show uppercased config entries.

18 files changed:
extra/fix_ob3.py
htsworkflow/frontend/analysis/main.py
htsworkflow/frontend/analysis/models.py
htsworkflow/frontend/auth.py
htsworkflow/frontend/bcmagic/utils.py
htsworkflow/frontend/eland_config/views.py
htsworkflow/frontend/experiments/experiments.py
htsworkflow/frontend/experiments/models.py
htsworkflow/frontend/experiments/tests.py
htsworkflow/frontend/inventory/views.py
htsworkflow/frontend/reports/libinfopar.py
htsworkflow/frontend/samples/models.py
htsworkflow/frontend/samples/results.py
htsworkflow/frontend/samples/views.py
htsworkflow/frontend/urls.py
htsworkflow/settings.py [deleted file]
scripts/htsw-record-runfolder
settings.py [new file with mode: 0644]

index 12789019097440580d5ae1fb0c08132572ebb73a..9955f69af624dcf8bfe360b345b2dd94ff490728 100644 (file)
@@ -7,7 +7,7 @@ import re
 import sys
 
 from django.core.management import setup_environ
-from htsworkflow.frontend import settings
+from django.conf import settings
 setup_environ(settings)
 
 import htsworkflow.frontend.samples.models as samples
index b57ad2050dcbca68c1b476d48570a3b2204fe715..ba2a739d5be0b461aaf02264a40dda6ed90e6863 100644 (file)
@@ -1,11 +1,14 @@
 # some core functions of analysis manager module
-from django.http import HttpResponse
+
 from datetime import datetime
 from string import *
 import re
-from htsworkflow.frontend import settings
-from htsworkflow.frontend.analysis.models import Task, Project
+
+from django.conf import settings
 from django.core.exceptions import ObjectDoesNotExist
+from django.http import HttpResponse
+
+from htsworkflow.frontend.analysis.models import Task, Project
 
 def updStatus(request):
     ClIP = request.META['REMOTE_ADDR']
index 41ecf424bc2d29902ce076e55bafad0feefbb792..5a580e0538a14e7d43a110f1c8d0a0f9e53416ab 100644 (file)
@@ -1,6 +1,6 @@
 from django.db import models
+from django.conf import settings
 from datetime import datetime
-from htsworkflow.frontend import settings
 from htsworkflow.frontend.samples.models import Library 
 from string import *
 
index 4df771b7025b4b73c2a04011f874c26de8a873ca..31650a6bb56d6189503a8e6a04d6240c8330459f 100644 (file)
@@ -2,8 +2,7 @@
 Define some alternate authentication methods
 """
 from django.core.exceptions import PermissionDenied
-
-from htsworkflow.frontend import settings
+from django.conf import settings
 
 apidata = {'apiid': u'0', 'apikey': settings.DEFAULT_API_KEY}
 
index e7d89d36e132eb1bece6b687304fc163a2a507ad..78919b00f99a8a834b90884b219fc2145f2e9f68 100644 (file)
@@ -1,4 +1,4 @@
-from htsworkflow.frontend import settings
+from django.conf import settings
 
 import ftplib
 import socket
@@ -53,4 +53,4 @@ def autofill(field, value):
     Return a bcm dictionary with a command to automatically fill the
     corresponding "field" with "value"
     """
-    return {'mode': 'autofill', 'field': field, 'value': value}
\ No newline at end of file
+    return {'mode': 'autofill', 'field': field, 'value': value}
index 6169f8a8d0e7b17dd8302a3fe58a92028f6db4c7..d21f86bb9d9995a9bb3dd1e69c08fe3ddc8a44d3 100644 (file)
@@ -1,9 +1,9 @@
+from django.conf import settings
 from django.http import HttpResponse
 from django.shortcuts import render_to_response
 from django.core.exceptions import ObjectDoesNotExist
 
 from htsworkflow.frontend.eland_config import forms
-from htsworkflow.frontend import settings
 from htsworkflow.frontend.experiments import models
 
 import os
index 882ea89c9961db701c3168f19efeb6910856a94c..5dec8cf5871bc640050c68b1118da2a3c073b400 100755 (executable)
@@ -12,9 +12,9 @@ from django.contrib.auth.decorators import login_required
 from django.core.exceptions import ObjectDoesNotExist
 from django.core.mail import send_mail, mail_admins
 from django.http import HttpResponse, Http404
+from django.conf import settings
 
 from htsworkflow.frontend.auth import require_api_key
-from htsworkflow.frontend import settings
 from htsworkflow.frontend.experiments.models import \
     FlowCell, \
     DataRun, \
index 10599e2174c0330cd2e16908bdf602179ac6f943..8a71e252331c600ce12eeaea8b20511f337ad98c 100755 (executable)
@@ -5,7 +5,8 @@ from django.core import urlresolvers
 from django.db import models
 
 from htsworkflow.frontend.samples.models import *
-from htsworkflow.frontend.settings import options
+#from htsworkflow.frontend.settings import options
+from django.conf import settings
 
 class ClusterStation(models.Model):
   name = models.CharField(max_length=50, unique=True)
@@ -21,7 +22,7 @@ class Sequencer(models.Model):
 
 default_pM = 5
 try:
-  default_pM = int(options.get('frontend', 'default_pm'))
+  default_pM = int(settings.DEFAULT_PM)
 except ValueError,e:
   logging.error("invalid value for frontend.default_pm")
 
index 9088b46144f3f7066e1e36482ada58346be63502..7bfebfec3f9a5190ef40dac3dacbcb51dcd3bdd9 100644 (file)
@@ -4,6 +4,7 @@ try:
     import json
 except ImportError, e:
     import simplejson as json
+import os
 import sys
 
 from django.core import mail
@@ -206,3 +207,4 @@ class TestEmailNotify(TestCase):
         # require that navigation back to the admin page exists
         self.failUnless(re.search('<a href="/admin/experiments/flowcell/153/">[^<]+</a>', response.content))
         
+
index dfb92a96ba8c41007b562f9cca750c6a8cd9a1b5..69848cc9ca21d716ca647757e9d2c68107c25806 100644 (file)
@@ -5,15 +5,14 @@ from htsworkflow.frontend.bcmagic.plugin import register_search_plugin
 from htsworkflow.frontend.experiments.models import FlowCell
 from htsworkflow.frontend.bcmagic.forms import BarcodeMagicForm
 from htsworkflow.frontend.bcmagic.utils import print_zpl_socket
-from htsworkflow.frontend import settings
-#from htsworkflow.util.jsonutil import encode_json
 
+from django.conf import settings
+from django.contrib.auth.decorators import login_required
 from django.core.exceptions import ObjectDoesNotExist
 from django.http import HttpResponse, HttpResponseRedirect
 from django.shortcuts import render_to_response
 from django.template import RequestContext, Template
 from django.template.loader import get_template
-from django.contrib.auth.decorators import login_required
 
 register_search_plugin('Inventory Item', item_search)
 
index 954fce693dc847d725fddc8b3e62b627fe8b924c..73072af68c8967f8f77a8dce6eac096ef264b4f4 100644 (file)
@@ -1,4 +1,4 @@
-from htsworkflow.frontend import settings
+from django.conf import settings
 from django.http import HttpResponse
 from datetime import datetime
 from string import *
index a8201c9c39068477736ab6fbd845e9c3bc161fd8..aac0ff6692686440e0943dabeed75b095d2d9b44 100644 (file)
@@ -4,7 +4,6 @@ from django.db import models
 from django.contrib.auth.models import User, UserManager
 from django.db.models.signals import pre_save, post_save
 from django.db import connection
-from htsworkflow.frontend import settings
 from htsworkflow.frontend.reports.libinfopar import *
 
 
index 39797b12d8c574f2660b3a57fb4fb3f432e746aa..3c6543a31bce847e7ab6d4ec72d8ff153e44c836 100644 (file)
@@ -1,4 +1,4 @@
-from htsworkflow.frontend import settings
+from django.conf import settings
 
 import glob
 import os
index c96b71870c946d15678cd030f670a5a0ae854c9e..2bbcc894a9c28ea5733f3ff62cdbebe1222bb480 100644 (file)
@@ -18,7 +18,6 @@ from htsworkflow.frontend.bcmagic.forms import BarcodeMagicForm
 from htsworkflow.pipelines.runfolder import load_pipeline_run_xml
 from htsworkflow.pipelines import runfolder
 from htsworkflow.pipelines.eland import ResultLane
-from htsworkflow.frontend import settings
 from htsworkflow.util.conversion import unicode_or_none
 from htsworkflow.util import makebed
 from htsworkflow.util import opener
@@ -30,6 +29,7 @@ from django.shortcuts import render_to_response, get_object_or_404
 from django.template import RequestContext
 from django.template.loader import get_template
 from django.contrib.auth.decorators import login_required
+from django.conf import settings
 
 LANE_LIST = [1,2,3,4,5,6,7,8]
 SAMPLES_CONTEXT_DEFAULTS = {
index c9ce79b7e880f277422489bacc4799f477f493bb..8cdb82c83936fb1c0859765d9bf09b3d31c1ef65 100644 (file)
@@ -9,7 +9,7 @@ admin.autodiscover()
 #databrowse.site.register(Library)
 #databrowse.site.register(FlowCell)
 
-from htsworkflow.frontend import settings
+from django.conf import settings
 
 
 urlpatterns = patterns('',
diff --git a/htsworkflow/settings.py b/htsworkflow/settings.py
deleted file mode 100644 (file)
index 9569d3e..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-"""
-Generate settings for the Django Application.
-
-To make it easier to customize the application the settings can be 
-defined in a configuration file read by ConfigParser.
-
-The options understood by this module are (with their defaults):
-
-  [frontend]
-  email_host=localhost
-  email_port=25
-  database_engine=sqlite3
-  database_name=/path/to/db
-
-  [admins]
-  #name1=email1
-
-  [allowed_hosts]
-  #name1=ip
-  localhost=127.0.0.1
-  
-  [allowed_analysis_hosts]
-  #name1=ip
-  localhost=127.0.0.1
-
-"""
-import ConfigParser
-import os
-import shlex
-
-# make epydoc happy
-__docformat__ = "restructuredtext en"
-
-def options_to_list(options, dest, section_name, option_name):
-  """
-  Load a options from section_name and store in a dictionary
-  """
-  if options.has_option(section_name, option_name):
-    opt = options.get(section_name, option_name)
-    dest.extend( shlex.split(opt) )
-      
-def options_to_dict(dest, section_name):
-  """
-  Load a options from section_name and store in a dictionary
-  """
-  if options.has_section(section_name):
-    for name in options.options(section_name):
-      dest[name] = options.get(section_name, name)
-
-# define your defaults here
-options = ConfigParser.SafeConfigParser(
-           { 'email_host': 'localhost',
-             'email_port': '25', 
-             'database_engine': 'sqlite3',
-             'database_name': 
-               os.path.abspath('../../fctracker.db'),
-             'time_zone': 'America/Los_Angeles',
-             'default_pm': '5',
-             'link_flowcell_storage_device_url': "http://localhost:8000/inventory/lts/link/",
-             'printer1_host': '127.0.0.1',
-             'printer1_port': '9100',
-             'printer2_host': '127.0.0.1',
-             'printer2_port': '9100',
-           })
-
-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')
-if not options.has_section('bcprinter'):
-    options.add_section('bcprinter')
-
-
-# Django settings for elandifier project.
-
-DEBUG = True
-TEMPLATE_DEBUG = DEBUG
-
-ADMINS = []
-options_to_list(options, ADMINS, 'frontend', 'admins')
-
-MANAGERS = []
-options_to_list(options, MANAGERS, 'frontend', 'managers')
-
-AUTHENTICATION_BACKENDS = ( 
-  'htsworkflow.frontend.samples.auth_backend.HTSUserModelBackend', )
-CUSTOM_USER_MODEL = 'samples.HTSUser' 
-
-EMAIL_HOST = options.get('frontend', 'email_host')
-EMAIL_PORT = int(options.get('frontend', 'email_port'))
-
-if options.has_option('frontend', 'notification_sender'):
-    NOTIFICATION_SENDER = options.get('frontend', 'notification_sender')
-else:
-    NOTIFICATION_SENDER = "noreply@example.com"
-NOTIFICATION_BCC = []
-options_to_list(options, NOTIFICATION_BCC, 'frontend', 'notification_bcc')
-
-# 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-DATABASE_ENGINE = options.get('frontend', 'database_engine')
-
-# 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.
-DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
-
-# Local time zone for this installation. Choices can be found here:
-# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
-# although not all variations may be possible on all operating systems.
-# If running in a Windows environment this must be set to the same as your
-# system time zone.
-TIME_ZONE = options.get('frontend', 'time_zone')
-
-# Language code for this installation. All choices can be found here:
-# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
-# http://blogs.law.harvard.edu/tech/stories/storyReader$15
-LANGUAGE_CODE = 'en-us'
-
-SITE_ID = 1
-
-# If you set this to False, Django will make some optimizations so as not
-# to load the internationalization machinery.
-USE_I18N = True
-
-# Absolute path to the directory that holds media.
-# Example: "/home/media/media.lawrence.com/"
-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 = '/static/'
-
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
-# trailing slash.
-# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/media/'
-
-# Make this unique, and don't share it with anybody.
-SECRET_KEY = '(ekv^=gf(j9f(x25@a7r+8)hqlz%&_1!tw^75l%^041#vi=@4n'
-
-# some of our urls need an api key
-DEFAULT_API_KEY = 'n7HsXGHIi0vp9j5u4TIRJyqAlXYc4wrH'
-
-# List of callables that know how to import templates from various sources.
-TEMPLATE_LOADERS = (
-    'django.template.loaders.filesystem.load_template_source',
-    'django.template.loaders.app_directories.load_template_source',
-#     'django.template.loaders.eggs.load_template_source',
-)
-
-MIDDLEWARE_CLASSES = (
-    'django.middleware.common.CommonMiddleware',
-    'django.contrib.sessions.middleware.SessionMiddleware',
-    'django.contrib.auth.middleware.AuthenticationMiddleware',
-    'django.middleware.doc.XViewMiddleware',
-)
-
-ROOT_URLCONF = 'htsworkflow.frontend.urls'
-
-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.
-    '/usr/share/python-support/python-django/django/contrib/admin/templates',
-    #'/usr/lib/pymodules/python2.6/django/contrib/admin/templates/',
-    os.path.join(os.path.split(__file__)[0], 'frontend','templates'),
-)
-
-INSTALLED_APPS = (
-    'django.contrib.admin',
-    'django.contrib.auth',
-    'django.contrib.contenttypes',
-    'django.contrib.humanize',
-    'django.contrib.sessions',
-    'django.contrib.sites',
-    'django_nose',
-    'htsworkflow.frontend.eland_config',
-    'htsworkflow.frontend.samples',
-    # modules from htsworkflow branch
-    'htsworkflow.frontend.experiments',
-    'htsworkflow.frontend.analysis', 
-    'htsworkflow.frontend.reports',
-    'htsworkflow.frontend.inventory',
-    'htsworkflow.frontend.bcmagic',
-    'django.contrib.databrowse',
-)
-
-# Project specific settings
-
-ALLOWED_IPS={'127.0.0.1': '127.0.0.1'}
-options_to_dict(ALLOWED_IPS, 'allowed_hosts')
-
-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')
-# Where "results_dir" means directory with all the flowcells
-if options.has_option('frontend', 'results_dir'):
-    RESULT_HOME_DIR=os.path.expanduser(options.get('frontend', 'results_dir'))
-else:
-    RESULT_HOME_DIR='/tmp'
-
-LINK_FLOWCELL_STORAGE_DEVICE_URL = options.get('frontend', 'link_flowcell_storage_device_url')
-# PORT 9100 is default for Zebra tabletop/desktop printers
-# PORT 6101 is default for Zebra mobile printers
-BCPRINTER_PRINTER1_HOST = options.get('bcprinter', 'printer1_host')
-BCPRINTER_PRINTER1_PORT = int(options.get('bcprinter', 'printer1_port'))
-BCPRINTER_PRINTER2_HOST = options.get('bcprinter', 'printer2_host')
-BCPRINTER_PRINTER2_PORT = int(options.get('bcprinter', 'printer2_port'))
-
-TEST_RUNNER='django_nose.NoseTestSuiteRunner'
index 288ec1ac00c1f05d327c48a0cb4cf735e16d6f3c..42bb61472d0c941787332e071f72f2422293b77e 100755 (executable)
@@ -1,8 +1,5 @@
 #!/usr/bin/env python
 
-from htsworkflow.util.hdquery import get_hd_serial_num
-from htsworkflow.frontend import settings
-
 from optparse import OptionParser
 import os
 import re
@@ -10,6 +7,10 @@ import sys
 import urllib2
 import urlparse
 
+from django.conf import settings
+
+from htsworkflow.util.hdquery import get_hd_serial_num
+
 runfolder_pattern = re.compile(r'[0-9]{6}_[-A-Za-z\d]+_\d+_(?P<flowcell>[A-Z\d]+)\.tgz')
 
 def extract_flowcell(runfolder_name):
diff --git a/settings.py b/settings.py
new file mode 100644 (file)
index 0000000..0f2d4da
--- /dev/null
@@ -0,0 +1,219 @@
+"""
+Generate settings for the Django Application.
+
+To make it easier to customize the application the settings can be 
+defined in a configuration file read by ConfigParser.
+
+The options understood by this module are (with their defaults):
+
+  [frontend]
+  email_host=localhost
+  email_port=25
+  database_engine=sqlite3
+  database_name=/path/to/db
+
+  [admins]
+  #name1=email1
+
+  [allowed_hosts]
+  #name1=ip
+  localhost=127.0.0.1
+  
+  [allowed_analysis_hosts]
+  #name1=ip
+  localhost=127.0.0.1
+
+"""
+import ConfigParser
+import os
+import shlex
+
+# make epydoc happy
+__docformat__ = "restructuredtext en"
+
+def options_to_list(options, dest, section_name, option_name):
+  """
+  Load a options from section_name and store in a dictionary
+  """
+  if options.has_option(section_name, option_name):
+    opt = options.get(section_name, option_name)
+    dest.extend( shlex.split(opt) )
+      
+def options_to_dict(dest, section_name):
+  """
+  Load a options from section_name and store in a dictionary
+  """
+  if options.has_section(section_name):
+    for name in options.options(section_name):
+      dest[name] = options.get(section_name, name)
+
+# define your defaults here
+options = ConfigParser.SafeConfigParser(
+           { 'email_host': 'localhost',
+             'email_port': '25', 
+             'database_engine': 'sqlite3',
+             'database_name': 
+               os.path.abspath('../../fctracker.db'),
+             'time_zone': 'America/Los_Angeles',
+             'default_pm': '5',
+             'link_flowcell_storage_device_url': "http://localhost:8000/inventory/lts/link/",
+             'printer1_host': '127.0.0.1',
+             'printer1_port': '9100',
+             'printer2_host': '127.0.0.1',
+             'printer2_port': '9100',
+           })
+
+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')
+if not options.has_section('bcprinter'):
+    options.add_section('bcprinter')
+
+
+# Django settings for elandifier project.
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+ADMINS = []
+options_to_list(options, ADMINS, 'frontend', 'admins')
+
+MANAGERS = []
+options_to_list(options, MANAGERS, 'frontend', 'managers')
+
+AUTHENTICATION_BACKENDS = ( 
+  'htsworkflow.frontend.samples.auth_backend.HTSUserModelBackend', )
+CUSTOM_USER_MODEL = 'samples.HTSUser' 
+
+EMAIL_HOST = options.get('frontend', 'email_host')
+EMAIL_PORT = int(options.get('frontend', 'email_port'))
+
+if options.has_option('frontend', 'notification_sender'):
+    NOTIFICATION_SENDER = options.get('frontend', 'notification_sender')
+else:
+    NOTIFICATION_SENDER = "noreply@example.com"
+NOTIFICATION_BCC = []
+options_to_list(options, NOTIFICATION_BCC, 'frontend', 'notification_bcc')
+
+# 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
+DATABASE_ENGINE = options.get('frontend', 'database_engine')
+
+# 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.
+DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.
+
+# Local time zone for this installation. Choices can be found here:
+# http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE
+# although not all variations may be possible on all operating systems.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = options.get('frontend', 'time_zone')
+
+# Language code for this installation. All choices can be found here:
+# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
+# http://blogs.law.harvard.edu/tech/stories/storyReader$15
+LANGUAGE_CODE = 'en-us'
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# Absolute path to the directory that holds media.
+# Example: "/home/media/media.lawrence.com/"
+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 = '/static/'
+
+# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# trailing slash.
+# Examples: "http://foo.com/media/", "/media/".
+ADMIN_MEDIA_PREFIX = '/media/'
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = '(ekv^=gf(j9f(x25@a7r+8)hqlz%&_1!tw^75l%^041#vi=@4n'
+
+# some of our urls need an api key
+DEFAULT_API_KEY = 'n7HsXGHIi0vp9j5u4TIRJyqAlXYc4wrH'
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+    'django.template.loaders.filesystem.load_template_source',
+    'django.template.loaders.app_directories.load_template_source',
+#     'django.template.loaders.eggs.load_template_source',
+)
+
+MIDDLEWARE_CLASSES = (
+    'django.middleware.common.CommonMiddleware',
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.middleware.doc.XViewMiddleware',
+)
+
+ROOT_URLCONF = 'htsworkflow.frontend.urls'
+
+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.
+    '/usr/share/python-support/python-django/django/contrib/admin/templates',
+    #'/usr/lib/pymodules/python2.6/django/contrib/admin/templates/',
+    os.path.join(os.path.split(__file__)[0],
+                 'htsworkflow', 'frontend','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.samples',
+    # modules from htsworkflow branch
+    'htsworkflow.frontend.experiments',
+    'htsworkflow.frontend.analysis', 
+    'htsworkflow.frontend.reports',
+    'htsworkflow.frontend.inventory',
+    'htsworkflow.frontend.bcmagic',
+    'django.contrib.databrowse',
+)
+
+# Project specific settings
+
+ALLOWED_IPS={'127.0.0.1': '127.0.0.1'}
+options_to_dict(ALLOWED_IPS, 'allowed_hosts')
+
+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')
+# Where "results_dir" means directory with all the flowcells
+if options.has_option('frontend', 'results_dir'):
+    RESULT_HOME_DIR=os.path.expanduser(options.get('frontend', 'results_dir'))
+else:
+    RESULT_HOME_DIR='/tmp'
+
+LINK_FLOWCELL_STORAGE_DEVICE_URL = options.get('frontend', 'link_flowcell_storage_device_url')
+# PORT 9100 is default for Zebra tabletop/desktop printers
+# PORT 6101 is default for Zebra mobile printers
+BCPRINTER_PRINTER1_HOST = options.get('bcprinter', 'printer1_host')
+BCPRINTER_PRINTER1_PORT = int(options.get('bcprinter', 'printer1_port'))
+BCPRINTER_PRINTER2_HOST = options.get('bcprinter', 'printer2_host')
+BCPRINTER_PRINTER2_PORT = int(options.get('bcprinter', 'printer2_port'))
+
+DEFAULT_PM=int(options.get('frontend', 'default_pm'))