Skip to content

Commit

Permalink
fix issue benoitc#106. Thanks for the report.
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitc committed Oct 22, 2010
1 parent 0f3f2e6 commit fce191c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gunicorn/app/djangoapp.py
Expand Up @@ -7,9 +7,6 @@
import sys
import traceback

from django.core.handlers.wsgi import WSGIHandler
from django.core.servers.basehttp import AdminMediaHandler, WSGIServerException

from gunicorn.config import Config
from gunicorn.app.base import Application

Expand Down Expand Up @@ -44,6 +41,7 @@ def no_settings(self, path):
sys.exit(1)

def load(self):
from django.core.handlers.wsgi import WSGIHandler
os.environ['DJANGO_SETTINGS_MODULE'] = self.settings_modname
return WSGIHandler()

Expand Down Expand Up @@ -89,6 +87,8 @@ def load_config(self):
self.cfg.set(k.lower(), v)

def load(self):
from django.core.servers.basehttp import AdminMediaHandler, WSGIServerException
from django.core.handlers.wsgi import WSGIHandler
try:
return AdminMediaHandler(WSGIHandler(), self.admin_media_path)
except WSGIServerException, e:
Expand Down

0 comments on commit fce191c

Please sign in to comment.