Start simplyfing settings by using from settings_local import * pattern.
[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 DEBUG = True
26
27 TEMPLATE_DEBUG = True
28
29 ALLOWED_HOSTS = ['jumpgate.caltech.edu']
30
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
46     'htsworkflow.frontend.eland_config',
47     'htsworkflow.frontend.samples',
48     'htsworkflow.frontend.experiments',
49     'htsworkflow.frontend.inventory',
50     'htsworkflow.frontend.bcmagic',
51     'htsworkflow.frontend.labels',
52 )
53
54 MIDDLEWARE_CLASSES = (
55     'django.contrib.sessions.middleware.SessionMiddleware',
56     'django.middleware.common.CommonMiddleware',
57     'django.middleware.csrf.CsrfViewMiddleware',
58     'django.contrib.auth.middleware.AuthenticationMiddleware',
59     'django.contrib.messages.middleware.MessageMiddleware',
60     'django.middleware.clickjacking.XFrameOptionsMiddleware',
61 )
62
63 TEMPLATE_DIRS = (
64     os.path.join(BASE_DIR, 'htsworkflow', 'frontend', 'templates'),
65     os.path.join(BASE_DIR, 'htsworkflow', 'templates'),
66 )
67
68 ROOT_URLCONF = 'htsworkflow.frontend.urls'
69 #ROOT_URLCONF='wsgiexample.urls'
70
71 WSGI_APPLICATION = 'htsworkflow.frontend.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 # Internationalization
84 # https://docs.djangoproject.com/en/1.6/topics/i18n/
85
86 LANGUAGE_CODE = 'en-us'
87
88 TIME_ZONE = 'UTC'
89
90 USE_I18N = True
91
92 USE_L10N = True
93
94 USE_TZ = True
95
96
97 # Static files (CSS, JavaScript, Images)
98 # https://docs.djangoproject.com/en/1.6/howto/static-files/
99 STATIC_URL = '/static/'
100
101 try:
102     # allow local customizations
103     from settings_local import *
104 except ImportError as e:
105     pass