diff --git a/src/main.py b/src/main.py index 6e215e45..17a34fd6 100644 --- a/src/main.py +++ b/src/main.py @@ -43,28 +43,16 @@ def get_home_folder(): def start_django(): - import django - django.setup() - - from django.conf import settings - settings.DEBUG = False - - logging.info("Preparing Kolibri for launch...") - from django.core.management import call_command - call_command("migrate", interactive=False, database="default") - - call_command("collectstatic", interactive=False) # remove this after Kolibri no longer needs it - if sys.version[0] == '2': + if sys.version[0] == "2": reload(sys) - sys.setdefaultencoding('utf8') + sys.setdefaultencoding("utf8") logging.info("Starting server...") -# from kolibri.utils.server import run_server -# run_server(5000) - from kolibri.utils.server import start - start(port=5000) + from kolibri.utils.cli import main + + main(["start", "--foreground", "--port=5000"]) class Application(pew.ui.PEWApp):