-DATABASES = {
- 'default': {
- 'ENGINE' : 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
- 'NAME' : os.path.join(DATAROOT,'unfold.sqlite3'), # Or path to database file if using sqlite3.
- 'USER' : '', # Not used with sqlite3.
- 'PASSWORD' : '', # Not used with sqlite3.
- 'HOST' : '', # Set to empty string for localhost. Not used with sqlite3.
- 'PORT' : '', # Set to empty string for default. Not used with sqlite3.
+if config.database :
+ DATABASES = {
+ 'default': {
+ 'ENGINE' : 'django.db.backends.%s' % config.database.engine,
+ 'USER' : config.database.user or '',
+ 'PASSWORD' : config.database.password or '',
+ 'HOST' : config.database.host or '',
+ 'PORT' : config.database.port or '',
+ }