|
Bradley Hintze
bradley.h at aggiemail.usu.edu
Thu Jun 24 09:37:50 EDT 2010
Hi all,
Newbie question. I was hoping to have template HTML at the beginning
of my .py script and the end. I can't get it to work. Here is what I
have.
destroy_confirm.py =
import HTML_template
HTML_template.start()
'''\
<center>
<table width = 550 cellpadding = 10 bgcolor=white>
<tr><td><center>This action will delete all your session files.
<tr><td><center>
<form action="destroy_LogOut.psp" method="">
<center><input type="submit" value="Run MolProbity Compare"></center>'''
HTML_template.end()
HTML_template.py =
def start():
start= '''\
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<center>
<table width = 1024 cellpadding = 10>
<tr><td valign = top>Molprobity Compare<br /><br /><br />
<a href ="destroy_confirm.psp">Log Off</a>
<td>
<table width = 850 cellpadding = 10>
<tr><td colspan = 2><center><h1>MolProbity Compare</h1></center>
<tr><td colspan = 2>Molprbity Compare will allow you
to compare Molprobity parameters
for two different structures. The program will
highlghit important
differences between the two.
</table>
<hr>
'''
return start
def end():
end = '''\
</table>
</center>
</body>
</html>
'''
return end
Handlers in httpd.conf =
<Directory /Library/WebServer/Documents>
AddHandler mod_python .py .psp .psp_
<FilesMatch "\.(psp|psp_)$">
PythonHandler mod_python.psp
</FilesMatch>
<Files *.py>
PythonHandler mod_python.publisher
</Files>
PythonDebug On
</Directory>
I hope this isn't too much to ask. Any ideas?
--
Bradley J. Hintze
Graduate Student
Duke University
School of Medicine
801-712-8799
|