Start fixing things for django 1.10.

This commit is contained in:
Griatch 2017-06-06 14:56:13 +02:00
parent 9af1c36a93
commit 7e416e0cd6
3 changed files with 5 additions and 3 deletions

View file

@ -195,7 +195,7 @@ class Evennia(object):
Optimize some SQLite stuff at startup since we
can't save it to the database.
"""
if ((".".join(str(i) for i in django.VERSION) < "1.2" and settings.DATABASE_ENGINE == "sqlite3")
if ((".".join(str(i) for i in django.VERSION) < "1.2" and settings.DATABASES.get('default', {}).get('ENGINE') == "sqlite3")
or (hasattr(settings, 'DATABASES')
and settings.DATABASES.get("default", {}).get('ENGINE', None)
== 'django.db.backends.sqlite3')):