comparison roundup/cgi/client.py @ 2565:89c5e8564dad

passs the message translator to cgitb functions
author Alexander Smishlajev <a1s@users.sourceforge.net>
date Tue, 13 Jul 2004 10:19:13 +0000
parents ff02e9851592
children 5a8d9465827e
comparison
equal deleted inserted replaced
2564:7500a9bb8bf9 2565:89c5e8564dad
1 # $Id: client.py,v 1.182 2004-07-11 14:23:12 a1s Exp $ 1 # $Id: client.py,v 1.183 2004-07-13 10:19:13 a1s Exp $
2 2
3 """WWW request handler (also used in the stand-alone server). 3 """WWW request handler (also used in the stand-alone server).
4 """ 4 """
5 __docformat__ = 'restructuredtext' 5 __docformat__ = 'restructuredtext'
6 6
274 except FormError, e: 274 except FormError, e:
275 self.error_message.append(self._('Form Error: ') + str(e)) 275 self.error_message.append(self._('Form Error: ') + str(e))
276 self.write_html(self.renderContext()) 276 self.write_html(self.renderContext())
277 except: 277 except:
278 # everything else 278 # everything else
279 self.write_html(cgitb.html()) 279 self.write_html(cgitb.html(i18n=self.translator))
280 280
281 def clean_sessions(self): 281 def clean_sessions(self):
282 """Age sessions, remove when they haven't been used for a week. 282 """Age sessions, remove when they haven't been used for a week.
283 283
284 Do it only once an hour. 284 Do it only once an hour.
619 return '<strong>%s</strong>'%message 619 return '<strong>%s</strong>'%message
620 except templating.Unauthorised, message: 620 except templating.Unauthorised, message:
621 raise Unauthorised, str(message) 621 raise Unauthorised, str(message)
622 except: 622 except:
623 # everything else 623 # everything else
624 return cgitb.pt_html() 624 return cgitb.pt_html(i18n=self.translator)
625 625
626 # these are the actions that are available 626 # these are the actions that are available
627 actions = ( 627 actions = (
628 ('edit', EditItemAction), 628 ('edit', EditItemAction),
629 ('editcsv', EditCSVAction), 629 ('editcsv', EditCSVAction),

Roundup Issue Tracker: http://roundup-tracker.org/