Nothing. first() returns None if there is no first record. Try row = db().select(db.Statuses.ALL).first() or 'nothing to see here'
On Aug 16, 1:09 pm, ram <ramasesh...@gmail.com> wrote: > This following code segment displays the first row from the table in > the view correctly when run using ./web2py. It returns None when run > in GAE development environment. What's wrong with this code? > > Controller: > def print_status(): > row = db().select(db.Statuses.ALL).first() > return dict(message=row) > > in the view, I have the default code: > {{extend 'layout.html'}} > <h1>This is the default/test_db.html template</h1> > {{=BEAUTIFY(response._vars)}} > > Thanks in advance