mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 12:07:17 +02:00
Fixed environment setup in ev.py, for launching the api in a normal python interpreter (not manage.py shell)
This commit is contained in:
parent
cc12dc36fa
commit
afb139bc1c
1 changed files with 4 additions and 5 deletions
9
ev.py
9
ev.py
|
|
@ -88,13 +88,12 @@ if __name__ == "__main__":
|
|||
######################################################################
|
||||
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
from django.conf import settings as settings_full
|
||||
try:
|
||||
settings_full.configure()
|
||||
except RuntimeError:
|
||||
pass
|
||||
sys.path.insert(1, os.path.dirname(os.path.abspath(__file__)) + os.path.sep + "game")
|
||||
os.environ["DJANGO_SETTINGS_MODULE"] = "game.settings"
|
||||
del sys, os
|
||||
|
||||
from game import settings
|
||||
from django.conf import settings as settings_full
|
||||
|
||||
try:
|
||||
# test this first import to make sure environment is set up correctly
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue