Some more work to get modules to load in the right order.
This commit is contained in:
parent
baae24b26f
commit
3fbc9acc51
2 changed files with 4 additions and 3 deletions
|
|
@ -430,6 +430,9 @@ def init_game_directory(path):
|
||||||
# Add gamedir to python path
|
# Add gamedir to python path
|
||||||
sys.path.insert(0, GAMEDIR)
|
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
|
# testing the main library import. If there are errors in importing
|
||||||
# the main library, it should show here.
|
# the main library, it should show here.
|
||||||
importlib.import_module("evennia")
|
importlib.import_module("evennia")
|
||||||
|
|
@ -444,8 +447,6 @@ def init_game_directory(path):
|
||||||
print ERROR_SETTINGS
|
print ERROR_SETTINGS
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
# Prepare django; set the settings location
|
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = SETTINGS_DOTPATH
|
|
||||||
import django
|
import django
|
||||||
# required since django1.7.
|
# required since django1.7.
|
||||||
django.setup()
|
django.setup()
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ from django.core.exceptions import ObjectDoesNotExist
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from evennia.server.models import ServerConfig
|
from evennia.server.models import ServerConfig
|
||||||
from evennia.utils.utils import to_str, uses_database
|
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")
|
__all__ = ("to_pickle", "from_pickle", "do_pickle", "do_unpickle")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue