Hi people,
I am running Django .96 and I have the situation, in which I need to
open a remote url using urlopen to get some information from the web.
Here is what I thought of:
Fork a new process from the view at the point where i need to perform
urlopen.
Create a pipe so that the child process can grab the write end to
wirte the results of urlopen and exit.
Meanwhile, the parent process performs all the DB lookups and misc.
operations.
Finally, before returning the response to the template use the read
end of the pipe to get the information from the child process and
render template.
But, for some reason, I get a modpython error:
Mod_python error: "PythonHandler django.core.handlers.modpython"
Traceback (most recent call last):
File "/usr/lib64/python2.4/site-packages/mod_python/apache.py", line
299, in HandlerDispatch
result = object(req)
File "/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 177, in handler
return ModPythonHandler()(req)
File "/usr/lib/python2.4/site-packages/django/core/handlers/
modpython.py", line 154, in __call__
response = middleware_method(request, response)
File "/usr/lib/python2.4/site-packages/django/middleware/common.py",
line 59, in process_response
if response.status_code == 404:
AttributeError: 'NoneType' object has no attribute 'status_code'
Any ideas on how to process information in parallel from inside a
view?
Any help is greatly appreciated. Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---