Initial conversion of HTSWorkflow to use south migrations.
[htsworkflow.git] / htsworkflow / settings.py
1 """
2 Django settings for wsgiexample project.
3
4 For more information on this file, see
5 https://docs.djangoproject.com/en/1.6/topics/settings/
6
7 For the full list of settings and their values, see
8 https://docs.djangoproject.com/en/1.6/ref/settings/
9 """
10
11 # Build paths inside the project like this: os.path.join(BASE_DIR, ...)
12 import os
13 BASE_DIR = os.path.dirname(os.path.dirname(__file__))
14
15
16 # Quick-start development settings - unsuitable for production
17 # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
18
19 # SECURITY WARNING: keep the secret key used in production secret!
20 SECRET_KEY = 'c=5&609$7)bm_u+3$2bi=ida$*a)c1(cp_0siua7uyww!1qfg_'
21
22 DEFAULT_API_KEY = 'n7HsXGHIi0vp9j5u4TIRJyqAlXYc4wrH'
23
24 # SECURITY WARNING: don't run with debug turned on in production!
25 # Override in settings_local
26 DEBUG = True
27
28 TEMPLATE_DEBUG = True
29
30 ALLOWED_HOSTS = ['jumpgate.caltech.edu']
31
32 # Application definition
33 AUTHENTICATION_BACKENDS = (
34   'htsworkflow.frontend.samples.auth_backend.HTSUserModelBackend', )
35 CUSTOM_USER_MODEL = 'samples.HTSUser'
36
37 INSTALLED_APPS = (
38     'django.contrib.admin',
39     'django.contrib.auth',
40     'django.contrib.contenttypes',
41     'django.contrib.sessions',
42     'django.contrib.messages',
43     'django.contrib.staticfiles',
44     'django.contrib.humanize',
45     'south',
46
47     'htsworkflow.frontend.eland_config',
48     'htsworkflow.frontend.samples',
49     'htsworkflow.frontend.experiments',
50     'htsworkflow.frontend.bcmagic',
51     'htsworkflow.frontend.inventory',
52     'htsworkflow.frontend.labels',
53 )
54
55 MIDDLEWARE_CLASSES = (
56     'django.contrib.sessions.middleware.SessionMiddleware',
57     'django.middleware.common.CommonMiddleware',
58     'django.middleware.csrf.CsrfViewMiddleware',
59     'django.contrib.auth.middleware.AuthenticationMiddleware',
60     'django.contrib.messages.middleware.MessageMiddleware',
61     'django.middleware.clickjacking.XFrameOptionsMiddleware',
62 )
63
64 TEMPLATE_DIRS = (
65     os.path.join(BASE_DIR, 'htsworkflow', 'frontend', 'templates'),
66     os.path.join(BASE_DIR, 'htsworkflow', 'templates'),
67 )
68
69 ROOT_URLCONF = 'htsworkflow.frontend.urls'
70
71 WSGI_APPLICATION = 'wsgi.application'
72
73 # Database
74 # https://docs.djangoproject.com/en/1.6/ref/settings/#databases
75
76 DATABASES = {
77     'default': {
78         'ENGINE': 'django.db.backends.sqlite3',
79         'NAME': os.path.join(BASE_DIR, 'fctracker.db'),
80     }
81 }
82
83 EMAIL_HOST = 'localhost'
84
85 # Internationalization
86 # https://docs.djangoproject.com/en/1.6/topics/i18n/
87
88 LANGUAGE_CODE = 'en-us'
89
90 TIME_ZONE = 'UTC'
91
92 USE_I18N = True
93
94 USE_L10N = True
95
96 USE_TZ = True
97
98 TIME_ZONE='America/Los_Angeles'
99
100 # Static files (CSS, JavaScript, Images)
101 # https://docs.djangoproject.com/en/1.6/howto/static-files/
102 STATICFILES_DIRS = (
103     os.path.join(BASE_DIR, 'htsworkflow', 'frontend', 'static'),
104 )
105 STATIC_URL = '/static/'
106
107
108 #####
109 # Application specific settings
110 DEFAULT_PM = 5
111
112 # How often to recheck the result archive
113 RESCAN_DELAY=1
114 # Update this in settings_local to point to your flowcell result directory
115 RESULT_HOME_DIR = os.path.join(BASE_DIR, 'test', 'result', 'flowcells')
116
117 # configure who is sending email and who should get BCCs of announcments
118 NOTIFICATION_SENDER = "noreply@example.com"
119 NOTIFICATION_BCC=[]
120
121 try:
122     # allow local customizations
123     from settings_local import *
124 except ImportError as e:
125     pass