[mod_python] mod_python and css

Red Conecta redconectabilbao at telefonica.net
Wed Dec 31 10:57:31 EST 2003


I'm trying to use css with the publisherhandler; here is the code:

    def _inicio():
        ini= '''<head><title>nombredelsitio</title>
                  <link rel="stylesheet" href="estilo.css"
    Type="text/css"></head>
                  <body leftmargin=0 rightmargin=0 topmargin=0
    bottommargin=0>'''
       
        return ini

    def _final():
        return '</body></html>'

    def mostrar(req,direccion='/'):
        req.content_type = "text/html"
        html=_inicio()
        obj=leerobjeto(direccion)
        if obj!=None:
            for i in obj.__dict__:html+=i+': '+obj.__dict__[i]+'<br>'
        else:html+='error'
        html+=_final()
        return html

the output doesn't use the estilo.css archive but if I save the page in 
'mostrar.html' all is ok.



More information about the Mod_python mailing list