localhost=127.0.0.1
"""
-import ConfigParser
+import configparser
import logging
import os
import shlex
dest[name] = options.get(section_name, name)
# define your defaults here
-options = ConfigParser.SafeConfigParser()
+options = configparser.SafeConfigParser()
def save_options(filename, options):
try:
ini_stream = open(filename, 'w')
options.write(ini_stream)
ini_stream.close()
- except IOError, e:
+ except IOError as e:
LOGGER.debug("Error saving setting: %s" % (str(e)))
INI_FILE = options.read([os.path.expanduser("~/.htsworkflow.ini"),
options_to_list(options, NOTIFICATION_BCC, 'frontend', 'notification_bcc')
if not options.has_option('frontend', 'database'):
- raise ConfigParser.NoSectionError(
+ raise configparser.NoSectionError(
"Please define [frontend] database=<Section>")
database_section = options.get('frontend', 'database')
if not options.has_section(database_section):
- raise ConfigParser.NoSectionError(
+ raise configparser.NoSectionError(
"No database=<database_section_name> defined")
# 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'.
# Example: "http://media.lawrence.com"
MEDIA_URL = '/static/'
-# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
+# URL prefix for static media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
-# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '/media/'
+STATIC_URL = '/media/'
# Make this unique, and don't share it with anybody.
if not options.has_option('frontend', 'secret'):
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
+ 'django.contrib.staticfiles',
'django.contrib.humanize',
'django.contrib.sessions',
'django.contrib.sites',