aboutsummaryrefslogtreecommitdiffstats
path: root/manage.py
diff options
context:
space:
mode:
authorGravatar Matteo Bertucci <[email protected]>2021-03-23 13:18:56 +0100
committerGravatar GitHub <[email protected]>2021-03-23 13:18:56 +0100
commit3790e7335dc88e38e8ed36e87af592dce7b53f9e (patch)
tree0d133cff28e5043c356a43afc0ba883d731d0fec /manage.py
parentMerge pull request #460 from python-discord/add-streamyard (diff)
parentRemoves Gunicorn Import In Debug mode (diff)
Merge pull request #461 from python-discord/move-gunicorn-import
Removes Gunicorn Import In Debug Mode
Diffstat (limited to 'manage.py')
-rwxr-xr-xmanage.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/manage.py b/manage.py
index fb5ee40c..71af23c4 100755
--- a/manage.py
+++ b/manage.py
@@ -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",