[web2py] Re: DAL query - GAE & local

2011-08-17 Thread ram
Thanks for clarifying

On Aug 17, 8:56 pm, howesc  wrote:
> note that standalone web2py defaults to sqlite storage, GAE development
> environment uses a GAE emulation of big-table, so data added when running
> standalone will not be available in GAE dev env and vice versa.
>
> cfh


[web2py] Re: DAL query - GAE & local

2011-08-17 Thread howesc
note that standalone web2py defaults to sqlite storage, GAE development 
environment uses a GAE emulation of big-table, so data added when running 
standalone will not be available in GAE dev env and vice versa.

cfh


[web2py] Re: DAL query - GAE & local

2011-08-16 Thread Massimo Di Pierro
Can you try:

db(db.Statuses).select().first()

did you check with the GAE console that the record is there?

On Aug 16, 8:21 pm, ram  wrote:
> 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 
> 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  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'}}
> > > This is the default/test_db.html template
> > > {{=BEAUTIFY(response._vars)}}
>
> > > Thanks in advance


[web2py] Re: DAL query - GAE & local

2011-08-16 Thread ram
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 
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  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'}}
> > This is the default/test_db.html template
> > {{=BEAUTIFY(response._vars)}}
>
> > Thanks in advance


[web2py] Re: DAL query - GAE & local

2011-08-16 Thread Massimo Di Pierro
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  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'}}
> This is the default/test_db.html template
> {{=BEAUTIFY(response._vars)}}
>
> Thanks in advance