fixed searilization of request/response/session in tickets (they are stored as html, thanks Dominik

This commit is contained in:
Massimo
2013-01-17 17:33:17 -06:00
parent c2ae4776a2
commit bb40239ed0
5 changed files with 132 additions and 147 deletions
+2 -2
View File
@@ -2243,9 +2243,9 @@ class BEAUTIFY(DIV):
for c in self.components:
if hasattr(c, 'value') and not callable(c.value):
if c.value:
components.append(c.value)
components.append(c.value)
if hasattr(c, 'xml') and callable(c.xml):
components.append(c)
c = str(c)
continue
elif hasattr(c, 'keys') and callable(c.keys):
rows = []
+3 -3
View File
@@ -16,7 +16,7 @@ import logging
from storage import Storage
from http import HTTP
from html import BEAUTIFY
from html import BEAUTIFY, XML
logger = logging.getLogger("web2py")
@@ -131,7 +131,7 @@ class RestrictedError(Exception):
try:
self.traceback = traceback.format_exc()
except:
self.traceback = 'no traceback because template parting error'
self.traceback = 'no traceback because template parsing error'
try:
self.snapshot = snapshot(context=10, code=code,
environment=self.environment)
@@ -319,6 +319,6 @@ def snapshot(info=None, context=5, code=None, environment=None):
# add web2py environment variables
for k, v in environment.items():
if k in ('request', 'response', 'session'):
s[k] = BEAUTIFY(v)
s[k] = XML(str(BEAUTIFY(v)))
return s
+1 -1
View File
@@ -5091,7 +5091,7 @@ class Wiki(object):
'%(slug)s')),
comment=current.T(
"Choose Template or empty for new Page")))
form = SQLFORM.factory(*fields, _class="well span6")
form = SQLFORM.factory(*fields, **dict(_class="well span6"))
form.element("[type=submit]").attributes["_value"] = \
current.T("Create Page from Slug")