-EMAIL_HOST = options.get('frontend', 'email_host', 'localhost')
-EMAIL_PORT = int(options.get('frontend', 'email_port', 25))
-
-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')
-
-database_section = options.get('frontend', 'database', 'database')
-
-if not options.has_section(database_section):
- raise ConfigParser.NoSectionError(
- "No database=<database_section_name> defined")
-
-# 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
-DATABASE_ENGINE = options.get(database_section, 'engine')
-DATABASE_NAME = options.get(database_section, 'name')
-if options.has_option(database_section, 'user'):
- DATABASE_USER = options.get(database_section, 'user')
-if options.has_option(database_section, 'host'):
- DATABASE_HOST = options.get(database_section, 'host')
-if options.has_option(database_section, 'port'):
- DATABASE_PORT = options.get(database_section, 'port')
-
-if options.has_option(database_section, 'password_file'):
- password_file = options.get(database_section, 'password_file')
- DATABASE_PASSWORD = open(password_file,'r').readline()
-elif options.has_option(database_section, 'password'):
- DATABASE_PASSWORD = options.get(database_section, 'password')
-
-# 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.
-if options.has_option('frontend', 'time_zone'):
- TIME_ZONE = options.get('frontend', 'time_zone')
-else:
- TIME_ZONE = 'America/Los_Angeles'
-
-# 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.join(HTSWORKFLOW_ROOT, 'frontend', '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.
-if not options.has_option('frontend', 'secret'):
- options.set('frontend', 'secret_key', make_django_secret_key(458))
- save_options(INI_FILE[0], options)
-SECRET_KEY = options.get('frontend', 'secret_key')
-
-# 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.contrib.csrf.middleware.CsrfMiddleware',
- 'django.middleware.common.CommonMiddleware',
- 'django.contrib.sessions.middleware.SessionMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',
- 'django.middleware.doc.XViewMiddleware',
-)
-
-TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + (
- 'htsworkflow.frontend.thispage.thispage',
-)
-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(HTSWORKFLOW_ROOT, 'frontend', 'templates'),
- os.path.join(HTSWORKFLOW_ROOT, 'templates'),
-)
-