Skip to content
Snippets Groups Projects
Verified Commit 678f240c authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Use the WSGI_APPLICATION setting when running Gunicorn

parent 67554cd3
No related branches found
No related tags found
1 merge request!2463Use the WSGI_APPLICATION setting when running Gunicorn
......@@ -4,7 +4,7 @@ import sys
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.core.wsgi import get_wsgi_application
from django.core.servers.basehttp import get_internal_wsgi_application
class Command(BaseCommand):
......@@ -67,6 +67,9 @@ class Command(BaseCommand):
}
def load(self):
return get_wsgi_application()
# Django's get_wsgi_application returns only its default WSGI app,
# but we want to use whatever app is set with the WSGI_APPLICATION setting,
# which is returned by get_internal_wsgi_application.
return get_internal_wsgi_application()
ArkindexServer().run()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment