Sceenshot
Add this HTML to your layout
<div id="web2py">
<h1>Web2py Environment</h1>
<div id="w2p_environ">
<div id="w2p_request">
<h2>Request</h2>
<div class="data">
{{=BEAUTIFY(request)}}
</div>
</div>
<div id="w2p_response">
<h2>Response</h2>
<div class="data">
{{=BEAUTIFY(response)}}
</div>
</div>
<div id="w2p_session">
<h2>Session</h2>
<div class="data">
{{=BEAUTIFY(session)}}
</div>
</div>
</div>
</div>
Add this CSS
Do alter the CSS to fit your website, so it can be useful and not in the way.
#web2py {
position: absolute;
top: 5px;
left: 5px;
height: 5%;
width: 25%;
background-color: #111111;
color: white;
overflow: auto;
}
#web2py h1 {
margin: 0;
padding: 0;
}
#web2py #w2p_environ {
position: absolute;
top: 50px;
left: 5px;
height: 100%;
width: 100%;
background-color: #111111;
color: white;
}
#web2py .data {
display: none;
overflow: auto;
position: relative;
height: 600px;
width: 100%;
}
Add this Javascript
web2py_height = "5"
jQuery("#web2py #w2p_environ").hide();
jQuery("#web2py .data").hide();
jQuery("#web2py h2").bind("click", function() {
jQuery("#web2py .data").slideUp();
jQuery(this).next().slideDown();
});
jQuery("#web2py h1").bind("click", function() {
if (web2py_height == "100"){
web2py_height = "5"
}else{
web2py_height = "100"
}
jQuery("#web2py").css({
"height": web2py_height + "%",
});
jQuery("#web2py #w2p_environ").slideToggle();
});
Comments (3)
0
aleksdj 15 years ago
0
thadeusb 15 years ago
0
rochacbruno 12 years ago
Now web2py has it built in:
So, I think this slice can be flagged as deprecated, or maybe I can create a flag "included in web2py Version x.x.x"