Revision 1c9a0076

b/snf-app/synnefo/app_settings/default/__init__.py
31 31
# interpreted as representing official policies, either expressed
32 32
# or implied, of GRNET S.A.
33 33

  
34
from synnefo.app_settings.default.database import *
35 34
from synnefo.app_settings.default.backend import *
36 35
from synnefo.app_settings.default.queues import *
37 36
from synnefo.app_settings.default.api import *
/dev/null
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
    }
b/snf-webproject/synnefo/webproject/settings/default/__init__.py
1
from synnefo.webproject.settings.default.database import *
1 2
from synnefo.webproject.settings.default.apps import *
2 3
from synnefo.webproject.settings.default.deploy import *
3 4
from synnefo.webproject.settings.default.site import *
b/snf-webproject/synnefo/webproject/settings/default/database.py
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
    }

Also available in: Unified diff