source: TI07-MOLES/trunk/PythonCode/newDiscovery/testtemplate.py @ 1536

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI07-MOLES/trunk/PythonCode/newDiscovery/testtemplate.py@1536
Revision 1536, 604 bytes checked in by lawrence, 15 years ago (diff)

Initial (html) templates for the new discovery interface

Line 
1import template
2
3def output(f,s):
4    ff=file(f,'w')
5    ff.write(s)
6    ff.close()
7
8
9helpAddress="http://localhost:8000/discoveryHelp"
10mainLogo="/layouts/logo"
11discoveryURL="http://localhost:8000/cgi/advSearch"
12advancedURL="http://localhost:8000/cgi/Search"
13
14main=template.main% locals()
15advanced=template.advanced % locals()
16
17# requires discoveryURL declared in parent, main defined here
18mainForm='''
19<method="get" action="%s">%s</form>
20'''%(discoveryURL,main)
21
22advancedForm='''
23<method="get" action="%s">%s</form>'''%(advancedURL,advanced)
24
25output("main.html",main)
26output("advanced.html",advanced)
27
28
Note: See TracBrowser for help on using the repository browser.