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 Optimize some SQLite stuff at startup since we
can't save it to the database. 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') or (hasattr(settings, 'DATABASES')
and settings.DATABASES.get("default", {}).get('ENGINE', None) and settings.DATABASES.get("default", {}).get('ENGINE', None)
== 'django.db.backends.sqlite3')): == 'django.db.backends.sqlite3')):

View file

@ -98,7 +98,9 @@ class TypeclassBase(SharedMemoryModelBase):
# this is a copy of django.db.models.base.__new__ # this is a copy of django.db.models.base.__new__
# with a few lines changed as per # with a few lines changed as per
# https://code.djangoproject.com/ticket/11560 # https://code.djangoproject.com/ticket/11560
new_class = patched_new(cls, name, bases, attrs) #new_class = patched_new(cls, name, bases, attrs)
new_class = super(TypeclassBase, cls).__new__(cls, name, bases, attrs)
#new_class = patched_new(cls, name, bases, attrs)
# attach signals # attach signals
signals.post_save.connect(post_save, sender=new_class) signals.post_save.connect(post_save, sender=new_class)

View file

@ -1,6 +1,6 @@
# Evennia dependencies, for Linux/Mac platforms # Evennia dependencies, for Linux/Mac platforms
django >= 1.8, < 1.10 django >= 1.9, < 1.11
twisted >= 16.0.0 twisted >= 16.0.0
mock >= 1.0.1 mock >= 1.0.1
pillow == 2.9.0 pillow == 2.9.0