Opened 20 years ago
Closed 20 years ago
#543 closed defect (fixed)
[patch] Django under mod_python broken
| Reported by: | 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)
Change History (4)
by , 20 years ago
| Attachment: | modpython.patch added |
|---|
comment:1 by , 20 years ago
| Summary: | Django under mod_python broken → [patch] Django under mod_python broken |
|---|
comment:2 by , 20 years ago
| Keywords: | mod_python modpython added |
|---|
Note:
See TracTickets
for help on using tickets.
Added [patch] to summary.