mirror of https://github.com/zulip/zulip.git
Conditionally configure MySQL as a database backend.
Even though SQLite is the default, Django tries to import MySQLdb, which on OS X is challenging to install. (imported from commit 0947c86e5e9a1fbf2ff8d74b78f297ff939ff712)
This commit is contained in:
parent
2fb626c106
commit
6ccbab9bf5
|
@ -22,12 +22,18 @@ DATABASES = {
|
|||
'timeout': 20,
|
||||
},
|
||||
},
|
||||
'mysql': {
|
||||
}
|
||||
|
||||
try:
|
||||
import MySQLdb
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
DATABASES['mysql'] = {
|
||||
'ENGINE': 'django.db.backends.mysql',
|
||||
'OPTIONS': {
|
||||
'read_default_file': '/etc/mysql/my.cnf',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
# Local time zone for this installation. Choices can be found here:
|
||||
|
|
Loading…
Reference in New Issue