Flatten project hierarchy, moving djano applications out of htsworkflow.frontend...
[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 import sys
14
15 DJANGO_ROOT = os.path.dirname(__file__)
16 PROJECT_ROOT = os.path.dirname(DJANGO_ROOT)
17
18 # Quick-start development settings - unsuitable for production
19 # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
20
21 # SECURITY WARNING: keep the secret key used in production secret!
22 SECRET_KEY = 'c=5&609$7)bm_u+3$2bi=ida$*a)c1(cp_0siua7uyww!1qfg_'
23
24 DEFAULT_API_KEY = 'n7HsXGHIi0vp9j5u4TIRJyqAlXYc4wrH'
25
26 # SECURITY WARNING: don't run with debug turned on in production!
27 # Override in settings_local
28 DEBUG = True
29
30 TEMPLATE_DEBUG = True
31
32 ALLOWED_HOSTS = ['jumpgate.caltech.edu']
33
34 # Application definition
35 AUTHENTICATION_BACKENDS = (
36   'samples.auth_backend.HTSUserModelBackend', )
37 CUSTOM_USER_MODEL = 'samples.HTSUser'
38
39 INSTALLED_APPS = (
40     'django.contrib.admin',
41     'django.contrib.auth',
42     'django.contrib.contenttypes',
43     'django.contrib.sessions',
44     'django.contrib.messages',
45     'django.contrib.staticfiles',
46     'django.contrib.humanize',
47
48     'eland_config',
49     'samples',
50     'experiments',
51     'bcmagic',
52     'inventory',
53     'labels',
54 )
55
56 MIDDLEWARE_CLASSES = (
57     'django.contrib.sessions.middleware.SessionMiddleware',
58     'django.middleware.common.CommonMiddleware',
59     'django.middleware.csrf.CsrfViewMiddleware',
60     'django.contrib.auth.middleware.AuthenticationMiddleware',
61     'django.contrib.messages.middleware.MessageMiddleware',
62     'django.middleware.clickjacking.XFrameOptionsMiddleware',
63 )
64
65 TEMPLATE_DIRS = (
66     os.path.join(DJANGO_ROOT, 'templates'),
67 )
68
69 ROOT_URLCONF = 'htsworkflow.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(PROJECT_ROOT, '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(DJANGO_ROOT, '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(PROJECT_ROOT, '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