Some more work to get modules to load in the right order.

This commit is contained in:
Griatch 2015-01-07 20:10:03 +01:00
parent baae24b26f
commit 3fbc9acc51
2 changed files with 4 additions and 3 deletions

View file

@ -430,6 +430,9 @@ def init_game_directory(path):
# Add gamedir to python path
sys.path.insert(0, GAMEDIR)
# Prepare django; set the settings location
os.environ['DJANGO_SETTINGS_MODULE'] = SETTINGS_DOTPATH
# testing the main library import. If there are errors in importing
# the main library, it should show here.
importlib.import_module("evennia")
@ -444,8 +447,6 @@ def init_game_directory(path):
print ERROR_SETTINGS
sys.exit()
# Prepare django; set the settings location
os.environ['DJANGO_SETTINGS_MODULE'] = SETTINGS_DOTPATH
import django
# required since django1.7.
django.setup()

View file

@ -30,7 +30,7 @@ from django.core.exceptions import ObjectDoesNotExist
from django.contrib.contenttypes.models import ContentType
from evennia.server.models import ServerConfig
from evennia.utils.utils import to_str, uses_database
from evennievenniautils import logger
from evennia.utils import logger
__all__ = ("to_pickle", "from_pickle", "do_pickle", "do_unpickle")