Hi All,
after had inserted a entity I cannot access display the records using the
default views/generic.html (I cannot use the admin DB neither !)
but this:
{{extend 'layout.html'}}
{{#=BEAUTIFY(response._vars)}}
{{=(response._vars)}}
would display:
{'owner': 7, 'records': <gluon.sql.SQLRows object at 0x01244990>, 'message':
<gluon.languages.lazyT object at 0x018F7750>, 'form': <gluon.sqlhtml.SQLFORM
object at 0x01244370>}
and this
{{extend 'layout.html'}}
{{#=BEAUTIFY(response._vars)}}
{{=(response._vars)}}
{{=(response._vars['records'])}}
whould display
Internal error
Ticket issued:
wub/127.0.0.1.2009-01-19.23-39-47.b16ba6fe-6228-4575-bb2e-2cfb9833b556
Ticket 127.0.0.1.2009-01-19.23-39-47.b16ba6fe-6228-4575-bb2e-2cfb9833b556
Error traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
Traceback (most recent call last):
File "C:\dev\web2py\gluon\restricted.py", line 62, in restricted
exec ccode in environment
File "C:/dev/web2py/applications/wub/views/generic.html"
<http://localhost:8000/admin/default/edit/wub/views/generic.html>,
line 51, in <module>
File "C:\dev\web2py\gluon\globals.py", line 61, in write
else: self.body.write(xmlescape(data))
File "C:\dev\web2py\gluon\html.py", line 19, in xmlescape
return data.xml()
File "C:\dev\web2py\gluon\sql.py", line 1421, in xml
return sqlhtml.SQLTABLE(self).xml()
File "C:\dev\web2py\gluon\sqlhtml.py", line 346, in __init__
for rc,record in enumerate(sqlrows):
File "C:\dev\web2py\gluon\sql.py", line 1390, in __iter__
yield self[i]
File "C:\dev\web2py\gluon\sql.py", line 1368, in __getitem__
y,m,d=[int(x) for x in str(value)[:10].strip().split('-')]
ValueError: need more than 1 value to unpack
In file: C:\dev\web2py\applications\wub/views/generic.html
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
response <http://localhost:8000/examples/global/vars/response>.write('<!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">\n<head>\n<meta http-equiv="content-type"
content="text/html; charset=utf-8" />\n<meta name="author" lang="en"
content="',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(response
<http://localhost:8000/examples/global/vars/response>.author)
response <http://localhost:8000/examples/global/vars/response>.write('"
/>\n<meta name="keywords" content="',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(response
<http://localhost:8000/examples/global/vars/response>.keywords)
response <http://localhost:8000/examples/global/vars/response>.write('"
/>\n<meta name="description" content="',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(response
<http://localhost:8000/examples/global/vars/response>.description)
response <http://localhost:8000/examples/global/vars/response>.write('"
/>\n<title>',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(response
<http://localhost:8000/examples/global/vars/response>.title or URL
<http://localhost:8000/examples/global/vars/URL>(r=request
<http://localhost:8000/examples/global/vars/request>))
response
<http://localhost:8000/examples/global/vars/response>.write('</title>\n<link
rel="stylesheet" media="screen,projection" type="text/css"
href="',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(URL
<http://localhost:8000/examples/global/vars/URL>(r=request
<http://localhost:8000/examples/global/vars/request>,c='static',f='styles.css'))
response <http://localhost:8000/examples/global/vars/response>.write('"
/>\n',escape=False)
import os
response <http://localhost:8000/examples/global/vars/response>.write('\n<link
href="',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(URL
<http://localhost:8000/examples/global/vars/URL>(r=request
<http://localhost:8000/examples/global/vars/request>,c='static',f='calendar.css'))
response <http://localhost:8000/examples/global/vars/response>.write('"
rel="stylesheet" type="text/css" media="screen" charset="utf-8"
/>\n<script src="',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(URL
<http://localhost:8000/examples/global/vars/URL>(r=request
<http://localhost:8000/examples/global/vars/request>,c='static',f='jquery.js'))
response <http://localhost:8000/examples/global/vars/response>.write('"
type="text/javascript"></script>\n<script src="',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(URL
<http://localhost:8000/examples/global/vars/URL>(r=request
<http://localhost:8000/examples/global/vars/request>,c='static',f='calendar.js'))
response <http://localhost:8000/examples/global/vars/response>.write('"
type="text/javascript" charset="utf-8"></script>\n<script
type="text/javascript"><!--\nfunction popup(url) {\n
newwindow=window.open(url,\'name\',\'height=400,width=600\');\n if
(window.focus) newwindow.focus();\n return false;\n}\nfunction
collapse(id) { $(\'#\'+id).slideToggle(); }\nfunction fade(id,value) {
if(value>0) $(\'#\'+id).hide().fadeIn(\'slow\'); else
$(\'#\'+id).show().fadeOut(\'slow\'); }\nfunction ajax(u,s,t) {\n var
query="";\n for(i=0; i<s.length; i++) { \n if(i>0)
query=query+"&";\n
query=query+encodeURIComponent(s[i])+"="+encodeURIComponent(document.getElementById(s[i]).value);\n
}\n $.ajax({type: "POST", url: u, data: query, success:
function(msg) { document.getElementById(t).innerHTML=msg; } });
\n}\nString.prototype.reverse = function () { return
this.split(\'\').reverse().join(\'\');};\n$(document).ready(function()
{\n$(\'.hidden\').hide();\n$(\'.error\').hide().slideDown(\'slow\');\n$(\'.flash\').hide().slideDown(\'slow\')\n$(\'.flash\').click(function()
{ $(this).fadeOut(\'slow\'); return false;
});\n$(\'input.string\').attr(\'size\',50);\n$(\'textarea.text\').attr(\'cols\',50).attr(\'rows\',10);\n$(\'input.integer\').keyup(function(){this.value=this.value.reverse().replace(/[^0-9\\-]|\\-(?=.)/g,\'\').reverse();});\n$(\'input.double\').keyup(function(){this.value=this.value.reverse().replace(/[^0-9\\-\\.]|[\\-](?=.)|[\\.](?=[0-9]*[\\.])/g,\'\').reverse();});\n$(\'input.delete\').attr(\'onclick\',\'if(this.checked)
if(!confirm("',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(T
<http://localhost:8000/examples/global/vars/T>('Sure you want to
delete this object?'))
response <http://localhost:8000/examples/global/vars/response>.write('"))
this.checked=false;\');\ntry {$("input.date").focus( function()
{Calendar.setup({\n inputField:this.id, ifFormat:"',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(T
<http://localhost:8000/examples/global/vars/T>('%Y-%m-%d'))
response <http://localhost:8000/examples/global/vars/response>.write('",
showsTime:false\n}); }); } catch(e) {};\ntry {
$("input.datetime").focus( function() {Calendar.setup({\n
inputField:this.id, ifFormat:"',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(T
<http://localhost:8000/examples/global/vars/T>('%Y-%m-%d %H:%M:%S'))
response <http://localhost:8000/examples/global/vars/response>.write('",
showsTime: true,timeFormat: "24"\n}); }); } catch(e) {};\ntry {
$("input.time").clockpick({\n starthour:0, endhour:23,
showminutes:true, military:true\n}); } catch(e)
{};\n});\n//--></script>\n</head>\n<body>\n<div id="header">\n <div
id="header_inner" class="fixed">\n <div id="logo">\n <h1><a
href="http://www.web2py.com">[web2py<sup
style="font-size:0.5em;">TM</sup>]</a></h1>\n <h2>',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(request
<http://localhost:8000/examples/global/vars/request>.application)
response <http://localhost:8000/examples/global/vars/response>.write('</h2>\n
</div>\n <div id="menu">\n <ul>\n ',escape=False)
for _name,_active,_link in response
<http://localhost:8000/examples/global/vars/response>.menu or []:
response <http://localhost:8000/examples/global/vars/response>.write('\n
<li><a href="',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(_link)
response <http://localhost:8000/examples/global/vars/response>.write('"
onmouseover="this.ccc=this.style.backgroundColor;this.style.backgroundColor=\'white\';"
onmouseout="this.style.backgroundColor=this.ccc;" ',escape=False)
if not _active:
response
<http://localhost:8000/examples/global/vars/response>.write('class="inactive"',escape=False)
pass
response
<http://localhost:8000/examples/global/vars/response>.write('>',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write(_name)
response
<http://localhost:8000/examples/global/vars/response>.write('</a></li>\n
',escape=False)
pass
response <http://localhost:8000/examples/global/vars/response>.write('\n
</ul>\n </div>\n </div>\n</div>\n<div id="main">\n <div
id="main_inner" class="fixed">\n <div
id="primaryContent_columnless">\n <div id="columnA_columnless">
\n ',escape=False)
if response <http://localhost:8000/examples/global/vars/response>.flash:
response <http://localhost:8000/examples/global/vars/response>.write('\n
<div class="flash">',escape=False)
response
<http://localhost:8000/examples/global/vars/response>.write(response
<http://localhost:8000/examples/global/vars/response>.flash)
response
<http://localhost:8000/examples/global/vars/response>.write('</div>\n
',escape=False)
pass
response <http://localhost:8000/examples/global/vars/response>.write('\n
\r\n',escape=False)
#=BEAUTIFY(response._vars)
response
<http://localhost:8000/examples/global/vars/response>.write('\r\n',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write((response
<http://localhost:8000/examples/global/vars/response>._vars))
response
<http://localhost:8000/examples/global/vars/response>.write('\r\n',escape=False)
response <http://localhost:8000/examples/global/vars/response>.write((response
<http://localhost:8000/examples/global/vars/response>._vars['records']))
response <http://localhost:8000/examples/global/vars/response>.write('\r\n\n
</div>\n </div>\n </div>\n</div>\n<div id="footer"
class="fixed">\n Powered by <a
href="http://www.web2py.com">web2py</a> (TM) created by Massimo Di
Pierro © 2007, 2008,
2009\n</div>\n</body>\n</html>',escape=False)
Powered by web2py <http://www.web2py.com/> (TM) created by Massimo Di
Pierro (c) 2007, 2008, 2009
Any ideas ?
thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---