[mod_python] publisher

Jorey Bump list at joreybump.com
Tue Jan 25 12:44:36 EST 2005


Lionel Roubeyrie wrote:

> ####################################
> and in a file:
> ####################################
> def index(req, date_calcul='0', date_prevu='0'):
>     if date_calcul=='0': test=''
>     else: test='ok'
>     page= '''
>         <html>
>         <head>
>                 <link rel='STYLESHEET' type='text/css' 
> href='static/miseenpage.css'>
[snip]
> Good, but I loss the stylesheet :-( Why?

It needs to be relative to the function, not the file. You'll soon grow 
tired of rewriting the HTML and develop some reusable header code, so 
you might as well use an URL or site-relative link, instead:

  href='http://example.com/static/miseenpage.css'
  href='/static/miseenpage.css'



More information about the Mod_python mailing list