[mod_python] publisher

Lionel Roubeyrie lroubeyrie at limair.asso.fr
Tue Jan 25 08:13:49 EST 2005


Hi again :-)
PSP is great but for my app publisher is better, then I put this in hhtp.conf:
####################################
<Directory /home/lionel/Developpement/PREVAIR_LIMAIR/CARTAIR/mod_web_publisher>
        Order allow,deny
        Allow from all
        Options Indexes Includes FollowSymLinks MultiViews
        SetHandler mod_python
        PythonHandler mod_python.publisher
        PythonDebug On
</Directory>
####################################
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'>
        </head>
        <body>
            %s
            <div align='center'>
                <form action='max1h' method='POST'>
                    <table width='80%%'>
                        <tr>
                            <td>Date de calcul:    <input type='text' 
name='date_calcul' value='%s'><br></td>
                        </tr>
                        <tr>
                            <td>Date de Prévision:   <input type='text' 
name='date_prevu' value='%s'><br></td>
                        </tr>
                        <tr>
                            <td><input type='submit' value='Afficher'></td>
                        </tr>
                    </table>
                </form>
            </div>
        </body>
        </html>'''%(test, date_calcul,date_prevu)
    return page
####################################
Good, but I loss the stylesheet :-( Why?

-- 
Lionel Roubeyrie - lroubeyrie at limair.asso.fr
LIMAIR
http://www.limair.asso.fr




More information about the Mod_python mailing list