Changeset 3295 for pykota/trunk/cgi-bin/dumpykota.cgi
- Timestamp:
- 01/21/08 21:00:58 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/cgi-bin/dumpykota.cgi
r3275 r3295 29 29 import urllib 30 30 31 from pykota import version 32 from pykota .tool import PyKotaToolError31 import pykota.appinit 32 from pykota import version, utils 33 33 from pykota.dumper import DumPyKota 34 from pykota.cgifuncs import getLanguagePreference, getCharsetPreference35 34 36 35 header = """Content-type: text/html;charset=%s … … 68 67 </head> 69 68 <body> 70 <!-- %s %s -->71 69 <p> 72 70 <form action="dumpykota.cgi" method="GET" name="mainform" onsubmit="return checkvalues()"> … … 123 121 """Displays the dumper interface.""" 124 122 global header, footer 125 print header % (self.charset, _("PyKota Data Dumper"), \ 126 self.language, self.charset, \ 123 content = [ header % (self.charset, _("PyKota Data Dumper"), \ 127 124 self.config.getLogoLink(), \ 128 125 self.config.getLogoURL(), version.__version__, \ 129 126 self.config.getLogoLink(), \ 130 127 version.__version__, _("PyKota Data Dumper"), \ 131 _("Dump"), _("Please click on the above button")) 132 print self.htmlListDataTypes(self.options.get("data", "")) 133 print "<br />" 134 print self.htmlListFormats(self.options.get("format", "")) 135 print "<br />" 136 print self.htmlFilterInput(" ".join(self.arguments)) 137 print "<br />" 138 print self.htmlOrderbyInput(self.options.get("orderby", "")) 139 print "<br />" 140 print self.htmlSumCheckbox(self.options.get("sum", "")) 141 print footer % (_("Dump"), version.__doc__, version.__years__, version.__author__, version.__gplblurb__) 128 _("Dump"), _("Please click on the above button")) ] 129 content.append(self.htmlListDataTypes(self.options.get("data", ""))) 130 content.append(u"<br />") 131 content.append(self.htmlListFormats(self.options.get("format", ""))) 132 content.append(u"<br />") 133 content.append(self.htmlFilterInput(" ".join(self.arguments))) 134 content.append(u"<br />") 135 content.append(self.htmlOrderbyInput(self.options.get("orderby", ""))) 136 content.append(u"<br />") 137 content.append(self.htmlSumCheckbox(self.options.get("sum", ""))) 138 content.append(footer % (_("Dump"), version.__doc__, version.__years__, version.__author__, version.__gplblurb__)) 139 for c in content : 140 sys.stdout.write(c.encode(self.charset, "replace")) 141 sys.stdout.flush() 142 142 143 143 def htmlListDataTypes(self, selected="") : … … 236 236 237 237 if __name__ == "__main__" : 238 admin = PyKotaDumperGUI(lang=getLanguagePreference(), charset=getCharsetPreference()) 238 utils.reinitcgilocale() 239 admin = PyKotaDumperGUI() 239 240 admin.deferredInit() 240 241 admin.form = cgi.FieldStorage()