Hi!
I've created a RSS-feed using the django.contrib.syndication
package.
It works fine on my dev-server (python manage.py runserver)
but when I
upload it to the Apache server that uses mod_python, I get
this error:
Mod_python error: "PythonHandler
django.core.handlers.modpython"
Traceback (most recent call last):
File
"/usr/lib/python2.4/site-packages/mod_python/apache.py&
quot;, line
299, in HandlerDispatch
result = object(req)
File
"/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 181, in handler
return ModPythonHandler()(req)
File
"/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 141, in __call__
os.environ.update(req.subprocess_env)
File "os.py", line 478, in update
self[k] = dict[k]
File "os.py", line 463, in __setitem__
putenv(key, item)
TypeError: putenv() argument 2 must be string, not list
The feed-code looks like this:
# coding: utf-8
from django.contrib.syndication.feeds import Feed
from grouphug.hugs.models import Confession
class LatestEntries(Feed):
title = "Gruppkram.se's senaste inlägg"
link = "/"
description = "De senaste inläggen på
Gruppkram.se"
def items(self):
return Confession.objects.order_by('-pub_date')[:10]
I thought that maybe the items method was the problem
according to the
"TypeError" in the error msg. But that's the way
they do it in the
docs (http://www.djangoproject.com/documentation/syndicat
ion_feeds/)
and it works smooth on my dev-server.
And, yes, I've seen this: http://cod
e.djangoproject.com/ticket/1154.
That looks depressing!
What might be the problem? Any ideas on what to try next?
Sebastian Dahlgren
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-users googlegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribe googlegroups.com
For more options, visit this group at htt
p://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|