import.py
branchxbelweb
changeset 47 2781ac85b807
parent 43 4d194fce51e1
equal deleted inserted replaced
46:d3c1de4d929e 47:2781ac85b807
     9 print "Content-type: text/html; charset=iso-8859-1;"
     9 print "Content-type: text/html; charset=iso-8859-1;"
    10 print
    10 print
    11 
    11 
    12 # import cgitb; cgitb.enable()
    12 # import cgitb; cgitb.enable()
    13 import cgi
    13 import cgi
    14 from htmltmpl import TemplateManager
    14 from templates import Template
    15 from webutils import get_template_processor
    15 from os import environ
    16 import os
       
    17 
    16 
    18 def main():
    17 def main():
    19     tmpl = TemplateManager().prepare("import.tmpl")
    18     db = my_db.connect(environ["REMOTE_USER"])
    20     tproc = get_template_processor()
    19     tmpl = Template("import.tmpl", db.get_preferences())
    21     print tproc.process(tmpl)
    20     print tmpl.process()
    22 
    21 
    23 if (__name__ == "__main__"):
    22 if (__name__ == "__main__"):
    24     main()
    23     main()