root / snf-common / synnefo / settings / default / database.py @ 2ce0636e
History | View | Annotate | Download (1015 Bytes)
1 |
# -*- coding: utf-8 -*-
|
---|---|
2 |
#
|
3 |
# Database settings
|
4 |
####################
|
5 |
|
6 |
import os |
7 |
|
8 |
DEFAULT_DB_PATH = '/usr/share/synnefo/'
|
9 |
DATABASES = { |
10 |
'default': {
|
11 |
# 'postgresql_psycopg2', 'postgresql','mysql', 'sqlite3' or 'oracle'
|
12 |
'ENGINE': 'sqlite3', |
13 |
# ATTENTION: This *must* be the absolute path if using sqlite3.
|
14 |
# See: http://docs.djangoproject.com/en/dev/ref/settings/#name
|
15 |
'NAME': os.path.join(DEFAULT_DB_PATH, 'database.sqlite'), |
16 |
'USER': '', # Not used with sqlite3. |
17 |
'PASSWORD': '', # Not used with sqlite3. |
18 |
# Set to empty string for localhost. Not used with sqlite3.
|
19 |
'HOST': '', |
20 |
# Set to empty string for default. Not used with sqlite3.
|
21 |
'PORT': '', |
22 |
} |
23 |
} |
24 |
|
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 |
} |