mod_python and css

B

Bradley Hintze

Hi all,

the mod_python mailing list is pretty dead so I thought I'd try asking
my question here.

I am using mod_python and am having trouble with my .py scripts that
output HTML. the HTML comes out alright but my style sheets are not
being rendered. I am sure that this has to do withe a mod handler
problem.

Here is what I have in httpd.conf:

<Directory /Library/WebServer/Documents/css>
AddHandler mod_python .css
PythonHandler handler::handler_css
PythonDebug On
</Directory>


Here is what handler.py looks like:

from mod_python import apache

def _dump(req, extension):
req.content_type = 'text/plain'
print >> req, 'uri = %s' % req.uri
print >> req, 'filename = %s' % req.filename
print >> req, 'path_info = %s' % req.path_info
print >> req, 'extension = %s' % extension
return apache.OK

def handler(req):
return _dump(req, '')

def handler_css(req):
return _dump(req, '.css')


Any ideas on what I'm doing wrong?

--
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top