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,13 +22,19 @@ DATABASES = {
|
||||||
'timeout': 20,
|
'timeout': 20,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'mysql': {
|
}
|
||||||
|
|
||||||
|
try:
|
||||||
|
import MySQLdb
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
DATABASES['mysql'] = {
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
'ENGINE': 'django.db.backends.mysql',
|
||||||
'OPTIONS': {
|
'OPTIONS': {
|
||||||
'read_default_file': '/etc/mysql/my.cnf',
|
'read_default_file': '/etc/mysql/my.cnf',
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
}
|
|
||||||
|
|
||||||
# Local time zone for this installation. Choices can be found here:
|
# Local time zone for this installation. Choices can be found here:
|
||||||
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
||||||
|
|
Loading…
Reference in New Issue