[albatross-users] Upgrade problems to albatross 1.10pre2
Dave Cole
djc at object-craft.com.au
Wed Jul 9 23:35:26 EST 2003
>>>>> "Andrew" == Andrew McNamara <andrewm at object-craft.com.au> writes:
>>> Ha. So much for that idea. The cause of the problem is Matt
>>> Goodall's patch to allow random page applications to work with his
>>> standalone server.
>> Eek, sorry!
>>
>> The 2nd patch for base_url will not fix this either as I never even
>> considered that base_url would not be an absolute path on the
>> server :-(.
Andrew> Ah well - we applied it without noticing either. Add some
Andrew> comments next time, Dave... (if in doubt, blame Dave)... 8-)
Always a good move - you are seldom wrong...
I am completely stumped trying to get a path_info that is not missing
the first directory element. Try out the following files with
mod_python and tell me what I am doing wrong.
- Dave
- - /var/www/alsamp/simple/.htaccess - - - - - - - - - - - - - - - -
DirectoryIndex app.py
SetHandler python-program
PythonHandler app
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - /var/www/alsamp/simple/app.py - - - - - - - - - - - - - - - - -
from mod_python import apache
from albatross import SimpleContext
def handler(req):
req.content_type = 'text/html'
req.send_http_header()
ctx = SimpleContext('.')
ctx.locals.req = req
templ = ctx.load_template('/var/www/alsamp/simple/req.html')
ctx.push_content_trap()
templ.to_html(ctx)
req.write(ctx.pop_content_trap())
return apache.OK
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - /var/www/alsamp/simple/req.html - - - - - - - - - - - - - - - -
<html>
<head>
<title>The mod_python environment</title>
</head>
<body>
<b>Request members</b><br>
<al-exec expr="r = req._req; n = dir(r)">
<table>
<al-for iter="i" expr="n">
<tr>
<td><al-value expr="i.value()"></td>
<td><al-value expr="getattr(r, i.value())"></td>
<tr>
</al-for>
</table>
<b>get_config()</b><br>
<al-exec expr="t = req.get_config(); n = t.keys(); n.sort()">
<table>
<al-for iter="i" expr="n">
<tr>
<td><al-value expr="i.value()"></td>
<td><al-value expr="t[i.value()]"></td>
<tr>
</al-for>
</table>
<b>get_dirs()</b><br>
<al-exec expr="t = req.get_dirs(); n = t.keys(); n.sort()">
<table>
<al-for iter="i" expr="n">
<tr>
<td><al-value expr="i.value()"></td>
<td><al-value expr="t[i.value()]"></td>
<tr>
</al-for>
</table>
</body>
</html>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
http://www.object-craft.com.au
More information about the Albatross-users
mailing list