fixed searilization of request/response/session in tickets (they are stored as html, thanks Dominik
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.1-alpha.2+timestamp.2013.01.17.11.34.20
|
Version 2.4.1-alpha.2+timestamp.2013.01.17.17.32.33
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<div id="exception_inner" class="hide">
|
<div id="exception_inner" class="hide">
|
||||||
<div class="inspect">
|
<div class="inspect">
|
||||||
<h5>{{=T("Exception instance attributes")}}</h5>
|
<h4>{{=T("Exception instance attributes")}}</h4>
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{for k,v in snapshot['exception'].items():}}
|
{{for k,v in snapshot['exception'].items():}}
|
||||||
@@ -109,33 +109,17 @@
|
|||||||
<a class="button btn" onclick="jQuery('#session').slideToggle()"><span>{{=T('session')}}</span></a>
|
<a class="button btn" onclick="jQuery('#session').slideToggle()"><span>{{=T('session')}}</span></a>
|
||||||
<a class="button btn" onclick="jQuery('#response').slideToggle()"><span>{{=T('response')}}</span></a>
|
<a class="button btn" onclick="jQuery('#response').slideToggle()"><span>{{=T('response')}}</span></a>
|
||||||
</p>
|
</p>
|
||||||
<div class="hide inspect resp1" id="locals"><h6>locals</h6>
|
<div class="hide inspect resp1" id="locals"><h4>locals</h4>
|
||||||
{{try:}}
|
{{=BEAUTIFY(snapshot.get('locals','no locals available in snapshot'))}}
|
||||||
{{=BEAUTIFY(snapshot['locals'])}}
|
|
||||||
{{except:}}
|
|
||||||
{{=BEAUTIFY('no locals available in snapshot')}}
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="hide inspect" id="request"><h6>request</h6>
|
<div class="hide inspect" id="request"><h4>request</h4>
|
||||||
{{try:}}
|
{{=XML(snapshot.get('request','no request available in snapshot'))}}
|
||||||
{{=BEAUTIFY(snapshot['request'])}}
|
|
||||||
{{except:}}
|
|
||||||
{{=BEAUTIFY('no request available in snapshot')}}
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="hide inspect" id="session"><h6>session</h6>
|
<div class="hide inspect" id="session"><h4>session</h4>
|
||||||
{{try:}}
|
{{=XML(snapshot.get('session','no session available in snapshot'))}}
|
||||||
{{=BEAUTIFY(snapshot['session'])}}
|
|
||||||
{{except:}}
|
|
||||||
{{=BEAUTIFY('no session available in snapshot')}}
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="hide inspect" id="response"><h6>response</h6>
|
<div class="hide inspect" id="response"><h4>response</h4>
|
||||||
{{try:}}
|
{{=XML(snapshot.get('response','no response available in snapshot'))}}
|
||||||
{{=BEAUTIFY(snapshot['response'])}}
|
|
||||||
{{except:}}
|
|
||||||
{{=BEAUTIFY('no response available in snapshot')}}
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{except Exception, e:}}
|
{{except Exception, e:}}
|
||||||
@@ -144,6 +128,7 @@
|
|||||||
<script language='javascript'>alert("Exception during snapshot rendering: {{=tb}} ");</script>
|
<script language='javascript'>alert("Exception during snapshot rendering: {{=tb}} ");</script>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
<div class="errorsource">
|
<div class="errorsource">
|
||||||
<h3>In file: {{=layer}}</h3>
|
<h3>In file: {{=layer}}</h3>
|
||||||
{{=CODE(code.replace('\r',''),language='python',link='/examples/global/vars/')}}
|
{{=CODE(code.replace('\r',''),language='python',link='/examples/global/vars/')}}
|
||||||
|
|||||||
+1
-1
@@ -2245,7 +2245,7 @@ class BEAUTIFY(DIV):
|
|||||||
if c.value:
|
if c.value:
|
||||||
components.append(c.value)
|
components.append(c.value)
|
||||||
if hasattr(c, 'xml') and callable(c.xml):
|
if hasattr(c, 'xml') and callable(c.xml):
|
||||||
components.append(c)
|
c = str(c)
|
||||||
continue
|
continue
|
||||||
elif hasattr(c, 'keys') and callable(c.keys):
|
elif hasattr(c, 'keys') and callable(c.keys):
|
||||||
rows = []
|
rows = []
|
||||||
|
|||||||
+3
-3
@@ -16,7 +16,7 @@ import logging
|
|||||||
|
|
||||||
from storage import Storage
|
from storage import Storage
|
||||||
from http import HTTP
|
from http import HTTP
|
||||||
from html import BEAUTIFY
|
from html import BEAUTIFY, XML
|
||||||
|
|
||||||
logger = logging.getLogger("web2py")
|
logger = logging.getLogger("web2py")
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ class RestrictedError(Exception):
|
|||||||
try:
|
try:
|
||||||
self.traceback = traceback.format_exc()
|
self.traceback = traceback.format_exc()
|
||||||
except:
|
except:
|
||||||
self.traceback = 'no traceback because template parting error'
|
self.traceback = 'no traceback because template parsing error'
|
||||||
try:
|
try:
|
||||||
self.snapshot = snapshot(context=10, code=code,
|
self.snapshot = snapshot(context=10, code=code,
|
||||||
environment=self.environment)
|
environment=self.environment)
|
||||||
@@ -319,6 +319,6 @@ def snapshot(info=None, context=5, code=None, environment=None):
|
|||||||
# add web2py environment variables
|
# add web2py environment variables
|
||||||
for k, v in environment.items():
|
for k, v in environment.items():
|
||||||
if k in ('request', 'response', 'session'):
|
if k in ('request', 'response', 'session'):
|
||||||
s[k] = BEAUTIFY(v)
|
s[k] = XML(str(BEAUTIFY(v)))
|
||||||
|
|
||||||
return s
|
return s
|
||||||
|
|||||||
+1
-1
@@ -5091,7 +5091,7 @@ class Wiki(object):
|
|||||||
'%(slug)s')),
|
'%(slug)s')),
|
||||||
comment=current.T(
|
comment=current.T(
|
||||||
"Choose Template or empty for new Page")))
|
"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"] = \
|
form.element("[type=submit]").attributes["_value"] = \
|
||||||
current.T("Create Page from Slug")
|
current.T("Create Page from Slug")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user