Thanks for your response. My problem is there is a record in the
database. While standalone returns a record, while in GAE environment,
it returns none.

On Aug 16, 11:40 pm, Massimo Di Pierro <[email protected]>
wrote:
> 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 <[email protected]> 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

Reply via email to