Revision 5505e60c snf-webproject/synnefo/webproject/settings/default/database.py
b/snf-webproject/synnefo/webproject/settings/default/database.py | ||
---|---|---|
1 |
# -*- coding: utf-8 -*- |
|
2 |
# |
|
3 | 1 |
# Database settings |
4 | 2 |
#################### |
5 | 3 |
|
6 |
import os |
|
7 | 4 |
|
8 |
DEFAULT_DB_PATH = '/usr/share/synnefo/' |
|
9 | 5 |
DATABASES = { |
10 | 6 |
'default': { |
11 |
# 'postgresql_psycopg2', 'postgresql','mysql', 'sqlite3' or 'oracle' |
|
7 |
# Available values 'postgresql_psycopg2', 'postgresql','mysql', |
|
8 |
# 'sqlite3' or 'oracle' |
|
12 | 9 |
'ENGINE': 'sqlite3', |
10 |
|
|
13 | 11 |
# ATTENTION: This *must* be the absolute path if using sqlite3. |
14 | 12 |
# See: http://docs.djangoproject.com/en/dev/ref/settings/#name |
15 |
'NAME': os.path.join(DEFAULT_DB_PATH, 'database.sqlite'), |
|
13 |
'NAME': '/usr/share/synnefo/synnefo_database.sqlite', |
|
14 |
|
|
16 | 15 |
'USER': '', # Not used with sqlite3. |
16 |
|
|
17 | 17 |
'PASSWORD': '', # Not used with sqlite3. |
18 | 18 |
# Set to empty string for localhost. Not used with sqlite3. |
19 |
|
|
19 | 20 |
'HOST': '', |
21 |
|
|
20 | 22 |
# Set to empty string for default. Not used with sqlite3. |
21 | 23 |
'PORT': '', |
24 |
|
|
25 |
# Uncomment the following lines if you use mysql database |
|
26 |
#'OPTIONS': { |
|
27 |
# 'init_command': 'SET storage_engine=INNODB; ' + |
|
28 |
# 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED', |
|
29 |
#} |
|
22 | 30 |
} |
23 | 31 |
} |
24 | 32 |
|
25 |
if DATABASES['default']['ENGINE'].endswith('mysql'): |
|
26 |
DATABASES['default']['OPTIONS'] = { |
|
27 |
'init_command': 'SET storage_engine=INNODB; ' + |
|
28 |
'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED', |
|
29 |
} |
Also available in: Unified diff