Changeset 3295 for pykota/trunk/cgi-bin/pykotme.cgi
- Timestamp:
- 01/21/08 21:00:58 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/cgi-bin/pykotme.cgi
r3275 r3295 30 30 import cStringIO 31 31 32 from pykota import version 33 from pykota.tool import PyKotaTool, PyKotaToolError 34 from pykota.cgifuncs import getLanguagePreference, getCharsetPreference 32 import pykota.appinit 33 34 from pykota import version, utils 35 from pykota.tool import PyKotaTool 36 from pykota.errors import PyKotaToolError 37 35 38 from pkpgpdls import analyzer, pdlparser 36 39 … … 44 47 </head> 45 48 <body> 46 <!-- %s %s -->47 49 <p> 48 50 <form action="pykotme.cgi" method="POST" enctype="multipart/form-data"> … … 96 98 """Displays the administrative interface.""" 97 99 global header, footer 98 print header % (self.charset, _("PyKota Quotes"), \ 99 self.language, self.charset, \ 100 content = [ header % (self.charset, _("PyKota Quotes"), \ 100 101 self.config.getLogoLink(), \ 101 102 self.config.getLogoURL(), version.__version__, \ 102 103 self.config.getLogoLink(), \ 103 104 version.__version__, _("PyKota Quotes"), \ 104 _("Quote")) 105 print self.body 106 print footer % (_("Quote"), version.__doc__, version.__years__, version.__author__, version.__gplblurb__) 105 _("Quote")) ] 106 content.append(self.body) 107 content.append(footer % (_("Quote"), version.__doc__, version.__years__, version.__author__, version.__gplblurb__)) 108 for c in content : 109 sys.stdout.write(c.encode(self.charset, "replace")) 110 sys.stdout.flush() 107 111 108 112 def error(self, message) : … … 187 191 188 192 if __name__ == "__main__" : 189 admin = PyKotMeGUI(lang=getLanguagePreference(), charset=getCharsetPreference()) 193 utils.reinitcgilocale() 194 admin = PyKotMeGUI() 190 195 admin.deferredInit() 191 196 admin.form = cgi.FieldStorage()