diff --git a/arkindex/documents/management/commands/gunicorn.py b/arkindex/documents/management/commands/gunicorn.py index accebace273af98ca3b8baa22834163ac11548ae..bbf44a441d0b75a2049d1c5f30d84f2d52befc77 100644 --- a/arkindex/documents/management/commands/gunicorn.py +++ b/arkindex/documents/management/commands/gunicorn.py @@ -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()