Statistics
| Branch: | Tag: | Revision:

root / settings.d / 10-database.conf @ 96b635d9

History | View | Annotate | Download (1 kB)

1
# -*- coding: utf-8 -*-
2
#
3
# Database settings
4
####################
5

    
6
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) + '/'
7

    
8
DATABASES = {
9
    'default': {
10
        # 'postgresql_psycopg2', 'postgresql','mysql', 'sqlite3' or 'oracle'
11
        'ENGINE': 'sqlite3',
12
         # ATTENTION: This *must* be the absolute path if using sqlite3.
13
         # See: http://docs.djangoproject.com/en/dev/ref/settings/#name
14
        'NAME': os.path.join(PROJECT_PATH, 'database.sqlite'),
15
        'USER': '',                      # Not used with sqlite3.
16
        'PASSWORD': '',                  # Not used with sqlite3.
17
        # Set to empty string for localhost. Not used with sqlite3.
18
        'HOST': '',
19
        # Set to empty string for default. Not used with sqlite3.
20
        'PORT': '',
21
    }
22
}
23

    
24
if DATABASES['default']['ENGINE'].endswith('mysql'):
25
    DATABASES['default']['OPTIONS'] = {
26
            'init_command': 'SET storage_engine=INNODB; ' +
27
                'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED',
28
    }