Code

Opened 9 years ago

Closed 9 years ago

#543 closed defect (fixed)

[patch] Django under mod_python broken

Reported by: sune.kirkeby@… Owned by: adrian
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: UI/UX:

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@… 9 years ago.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by sune.kirkeby@…

comment:1 Changed 9 years ago by sune.kirkeby@…

  • Summary changed from Django under mod_python broken to [patch] Django under mod_python broken

Added [patch] to summary.

comment:2 Changed 9 years ago by anonymous

  • Keywords mod_python modpython added

comment:3 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [672].

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.