diff options
author | 2021-03-23 15:05:34 +0300 | |
---|---|---|
committer | 2021-03-23 15:05:34 +0300 | |
commit | fc53a53db1952d785ef3ca0eca8ec54dc5971db7 (patch) | |
tree | 0d133cff28e5043c356a43afc0ba883d731d0fec | |
parent | Merge pull request #460 from python-discord/add-streamyard (diff) |
Removes Gunicorn Import In Debug mode
Moves the gunicorn import below the start server command for debug mode
to ensure it isn't imported if it isn't used. This solves issues with
manage.py being unable to start on windows.
-rwxr-xr-x | manage.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -7,7 +7,6 @@ import time from typing import List import django -import gunicorn.app.wsgiapp from django.contrib.auth import get_user_model from django.core.management import call_command, execute_from_command_line @@ -156,6 +155,9 @@ class SiteManager: call_command("runserver", "0.0.0.0:8000") return + # Import gunicorn only if we aren't in debug mode. + import gunicorn.app.wsgiapp + # Patch the arguments for gunicorn sys.argv = [ "gunicorn", |