From 3a815055b12dc075b0a67fc2f6fe626af56dc5b2 Mon Sep 17 00:00:00 2001 From: gdetrez Date: Sat, 2 Dec 2006 23:23:24 +0100 Subject: [PATCH] =?UTF-8?q?correction=20de=20bugs=20+=20envoie=20syst?= =?UTF-8?q?=C3=A9matique=20de=20mails=20en=20cas=20d'erreur?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20061202222324-f46e9-2793a0a4b96eea2b3b78b8c15d7eba43d3796371.gz --- intranet/Root.py | 51 +++++++++++++++++++++++++++++++- intranet/pages/impression.py | 28 +++++++++++++++++- intranet/static/css/digicode.css | 3 ++ 3 files changed, 80 insertions(+), 2 deletions(-) diff --git a/intranet/Root.py b/intranet/Root.py index 1150aefc..985dcc69 100755 --- a/intranet/Root.py +++ b/intranet/Root.py @@ -1,5 +1,29 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- +# -*- coding: iso-8859-15 -*- +# ############################################################# +# .. +# .... ............ ........ +# . ....... . .... .. +# . ... .. .. .. .. ..... . .. +# .. .. ....@@@. .. . ........ . +# .. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. .... +# .@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... .... +# @@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. .. +# .@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. ..... +# ...@@@.... @@@ .@@.......... ........ ..... .. +# . ..@@@@.. . .@@@@. .. ....... . ............. +# . .. .... .. .. . ... .... +# . . .... ............. .. ... +# .. .. ... ........ ... ... +# ................................ +# +# ############################################################# +# __init__.py +# +# Classe impression +# +# Copyright (c) 2006 by www.crans.org +# ############################################################# import cherrypy, sys, os, datetime @@ -117,6 +141,28 @@ Ceci est un rapport de bug envoye depuis l'intranet. %s """ % "\n".join( [ "%s: %s" % (str(a), str(kw[a])) for a in kw] ) + text += "\n= Cherrypy vars =\n" + try: + text += "url: %s\n" % cherrypy.request.browser_url + except: + pass + try: + text += "headers: \n %s\n" % "\n".join( [" %s: %s" % (str(a), str(cherrypy.request.headers[a])) for a in cherrypy.request.headers] ) + except: + pass + try: + text += "request_line: %s\n" % cherrypy.request.request_line + except: + pass + try: + text += "query_string: %s\n" % cherrypy.request.query_string + except: + pass + try: + text += "path: %s\n" % cherrypy.request.path + except: + pass + quickSend(exp, dest, subject, text) return self.index() @@ -145,9 +191,12 @@ Ceci est un rapport de bug envoye depuis l'intranet. 'standalone':False, } elif status==500: + self.send_error_repport(status = status, message = message ) + # les filtres ne sont pas appliqués, on le fait à la main... from plugins.templatesfilter import TemplatesFilter TemplatesFilter().goWithThisDict({'template':'error', 'values':{'status':status, 'message':message }}) else: + self.send_error_repport(status = status, message = message) cherrypy._cputil._cp_on_http_error(status, message) diff --git a/intranet/pages/impression.py b/intranet/pages/impression.py index 767def76..deb4effb 100755 --- a/intranet/pages/impression.py +++ b/intranet/pages/impression.py @@ -1,4 +1,30 @@ -#! /usr/bin/env python +#!/usr/bin/env python +# -*- coding: iso-8859-15 -*- +# ############################################################# +# .. +# .... ............ ........ +# . ....... . .... .. +# . ... .. .. .. .. ..... . .. +# .. .. ....@@@. .. . ........ . +# .. . .. ..@.@@..@@. .@@@@@@@ @@@@@@. .... +# .@@@@. .@@@@. .@@@@..@@.@@..@@@..@@@..@@@@.... .... +# @@@@... .@@@.. @@ @@ .@..@@..@@...@@@. .@@@@@. .. +# .@@@.. . @@@. @@.@@..@@.@@..@@@ @@ .@@@@@@.. ..... +# ...@@@.... @@@ .@@.......... ........ ..... .. +# . ..@@@@.. . .@@@@. .. ....... . ............. +# . .. .... .. .. . ... .... +# . . .... ............. .. ... +# .. .. ... ........ ... ... +# ................................ +# +# ############################################################# +# impression.py +# +# interface d'impression +# +# Copyright (c) 2006 by www.crans.org +# ############################################################# + import cherrypy, tempfile, shutil, os import crans.impression import crans.impression.digicode diff --git a/intranet/static/css/digicode.css b/intranet/static/css/digicode.css index da841cc4..921f9165 100644 --- a/intranet/static/css/digicode.css +++ b/intranet/static/css/digicode.css @@ -80,3 +80,6 @@ div#addCodeBox form button { margin:3px; } +form input.textinput { +border: thin gray solid; +}