showard | 3544486 | 2008-08-07 22:35:30 +0000 | [diff] [blame] | 1 | # Django settings for new_tko project. |
| 2 | |
| 3 | import common |
| 4 | from autotest_lib.client.common_lib import global_config |
| 5 | |
| 6 | DEBUG = True |
| 7 | TEMPLATE_DEBUG = DEBUG |
| 8 | |
| 9 | ADMINS = ( |
| 10 | # ('Your Name', 'your_email@domain.com'), |
| 11 | ) |
| 12 | |
| 13 | MANAGERS = ADMINS |
| 14 | |
showard | a5288b4 | 2009-07-28 20:06:08 +0000 | [diff] [blame] | 15 | DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', |
showard | 3544486 | 2008-08-07 22:35:30 +0000 | [diff] [blame] | 16 | # 'mysql', 'sqlite3' or 'ado_mssql'. |
| 17 | DATABASE_PORT = '' # Set to empty string for default. |
| 18 | # Not used with sqlite3. |
| 19 | |
| 20 | c = global_config.global_config |
| 21 | _section = 'TKO' |
| 22 | DATABASE_HOST = c.get_config_value(_section, "host") |
| 23 | # Or path to database file if using sqlite3. |
| 24 | DATABASE_NAME = c.get_config_value(_section, "database") |
| 25 | # The following not used with sqlite3. |
| 26 | DATABASE_USER = c.get_config_value(_section, "user") |
showard | 7a37db1 | 2009-01-08 23:31:08 +0000 | [diff] [blame] | 27 | DATABASE_PASSWORD = c.get_config_value(_section, "password", default='') |
showard | 3544486 | 2008-08-07 22:35:30 +0000 | [diff] [blame] | 28 | |
showard | 1a573ca | 2008-09-11 01:32:03 +0000 | [diff] [blame] | 29 | DATABASE_READONLY_HOST = c.get_config_value(_section, "readonly_host", |
| 30 | default=DATABASE_HOST) |
showard | 3544486 | 2008-08-07 22:35:30 +0000 | [diff] [blame] | 31 | DATABASE_READONLY_USER = c.get_config_value(_section, "readonly_user", |
| 32 | default=DATABASE_USER) |
showard | 7a37db1 | 2009-01-08 23:31:08 +0000 | [diff] [blame] | 33 | if DATABASE_READONLY_USER != DATABASE_USER: |
| 34 | DATABASE_READONLY_PASSWORD = c.get_config_value(_section, |
| 35 | "readonly_password", |
| 36 | default='') |
| 37 | else: |
| 38 | DATABASE_READONLY_PASSWORD = DATABASE_PASSWORD |
showard | 3544486 | 2008-08-07 22:35:30 +0000 | [diff] [blame] | 39 | |
| 40 | # prefix applied to all URLs - useful if requests are coming through apache, |
| 41 | # and you need this app to coexist with others |
| 42 | URL_PREFIX = 'new_tko/server/' |
| 43 | |
| 44 | # Local time zone for this installation. Choices can be found here: |
| 45 | # http://www.postgresql.org/docs/8.1/static/datetime-keywords.html#DATETIME-TIMEZONE-SET-TABLE |
| 46 | # although not all variations may be possible on all operating systems. |
| 47 | # If running in a Windows environment this must be set to the same as your |
| 48 | # system time zone. |
| 49 | TIME_ZONE = 'America/Los_Angeles' |
| 50 | |
| 51 | # Language code for this installation. All choices can be found here: |
| 52 | # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes |
| 53 | # http://blogs.law.harvard.edu/tech/stories/storyReader$15 |
| 54 | LANGUAGE_CODE = 'en-us' |
| 55 | |
| 56 | SITE_ID = 1 |
| 57 | |
| 58 | # If you set this to False, Django will make some optimizations so as not |
| 59 | # to load the internationalization machinery. |
| 60 | USE_I18N = True |
| 61 | |
| 62 | # Absolute path to the directory that holds media. |
| 63 | # Example: "/home/media/media.lawrence.com/" |
| 64 | MEDIA_ROOT = '' |
| 65 | |
| 66 | # URL that handles the media served from MEDIA_ROOT. |
| 67 | # Example: "http://media.lawrence.com" |
| 68 | MEDIA_URL = '' |
| 69 | |
| 70 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
| 71 | # trailing slash. |
| 72 | # Examples: "http://foo.com/media/", "/media/". |
| 73 | ADMIN_MEDIA_PREFIX = '/media/' |
| 74 | |
| 75 | # Make this unique, and don't share it with anybody. |
| 76 | SECRET_KEY = 't5h^o%emw-1#ga4tvcb82)8irk^w5kyy348osow#$=&3c%60@r' |
| 77 | |
| 78 | # List of callables that know how to import templates from various sources. |
| 79 | TEMPLATE_LOADERS = ( |
| 80 | 'django.template.loaders.filesystem.load_template_source', |
| 81 | 'django.template.loaders.app_directories.load_template_source', |
| 82 | # 'django.template.loaders.eggs.load_template_source', |
| 83 | ) |
| 84 | |
| 85 | MIDDLEWARE_CLASSES = ( |
| 86 | 'django.middleware.common.CommonMiddleware', |
| 87 | 'django.contrib.sessions.middleware.SessionMiddleware', |
| 88 | 'autotest_lib.frontend.apache_auth.GetApacheUserMiddleware', |
| 89 | 'django.middleware.doc.XViewMiddleware', |
| 90 | ) |
| 91 | |
| 92 | ROOT_URLCONF = 'new_tko.urls' |
| 93 | |
| 94 | TEMPLATE_DIRS = ( |
| 95 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". |
| 96 | # Always use forward slashes, even on Windows. |
| 97 | # Don't forget to use absolute paths, not relative paths. |
| 98 | ) |
| 99 | |
| 100 | INSTALLED_APPS = ( |
| 101 | 'new_tko.tko', |
| 102 | 'django.contrib.contenttypes', |
| 103 | 'django.contrib.sessions', |
| 104 | 'django.contrib.sites', |
| 105 | ) |