From 198a192595d609d83b8f2d84a514e0ad8650aff2 Mon Sep 17 00:00:00 2001 From: duysqubix Date: Wed, 9 Dec 2020 10:12:55 -0600 Subject: [PATCH] Adds jupyter notebook support Forces the installation of django_extensions. Simply adds the `shell_plus` command to be seen in main evennia binary when parsing arguments. A notebook can be started with the following `evennia shell_plus --notebook` --- evennia/server/evennia_launcher.py | 2 +- requirements.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/evennia/server/evennia_launcher.py b/evennia/server/evennia_launcher.py index 9fed573caf..dcfbbb8a7c 100644 --- a/evennia/server/evennia_launcher.py +++ b/evennia/server/evennia_launcher.py @@ -2259,7 +2259,7 @@ def main(): if option in ("makemessages", "compilemessages"): # some commands don't require the presence of a game directory to work need_gamedir = False - if option in ("shell", "check", "makemigrations", "createsuperuser"): + if option in ("shell", "check", "makemigrations", "createsuperuser", "shell_plus"): # some django commands requires the database to exist, # or evennia._init to have run before they work right. check_db = True diff --git a/requirements.txt b/requirements.txt index 10485f708b..e09b5bf7e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ pytz djangorestframework >= 3.10.3, < 3.12 django-filter >= 2.2.0, < 2.3 django-sekizai +django-extensions >= 3.1.0 inflect autobahn >= 17.9.3 lunr == 0.5.6