Opened 19 years ago

Closed 19 years ago

#543 closed defect (fixed)

[patch] Django under mod_python broken

Reported by: sune.kirkeby@… Owned by: Adrian Holovaty
Component: Core (Other) Version:
Severity: blocker Keywords: mod_python modpython
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Mod_python error: "PythonHandler django.core.handlers.modpython"

Traceback (most recent call last):

  File "/usr/local/opt/python/lib/python2.4/site-packages/mod_python/apache.py", line 287, in HandlerDispatch
    log=debug)

  File "/usr/local/opt/python/lib/python2.4/site-packages/mod_python/apache.py", line 457, in import_module
    module = imp.load_module(mname, f, p, d)

  File "/home/sune/django/django/core/handlers/modpython.py", line 1, in ?
    from django.core.handlers.base import BaseHandler

  File "/home/sune/django/django/core/handlers/base.py", line 1, in ?
    from django.utils import httpwrappers

  File "/home/sune/django/django/utils/httpwrappers.py", line 5, in ?
    from django.conf.settings import DEFAULT_MIME_TYPE

  File "/home/sune/django/django/conf/settings.py", line 29, in ?
    raise EnvironmentError, "Environment variable %s is undefined." % ENVIRONMENT_VARIABLE

EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is undefined.

This is what you get, if you do not set DJANGO_SETTINGS_MODULE in your environment before starting
your mod_python-Apache. Some recent changeset did not heed the warning at the top of the modpython.py.
I'll attach a patch in a moment.

Attachments (1)

modpython.patch (1.1 KB ) - added by sune.kirkeby@… 19 years ago.

Download all attachments as: .zip

Change History (4)

by sune.kirkeby@…, 19 years ago

Attachment: modpython.patch added

comment:1 by sune.kirkeby@…, 19 years ago

Summary: Django under mod_python broken[patch] Django under mod_python broken

Added [patch] to summary.

comment:2 by anonymous, 19 years ago

Keywords: mod_python modpython added

comment:3 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

Fixed in [672].

Note: See TracTickets for help on using tickets.
Back to Top