Hi, Massimo. Thanks for your reply.

My code:

In the model:
db = DAL('sqlite://storage.sqlite')
db.define_table('person', Field('name', requires=IS_NOT_EMPTY()))


In the controller:
def people():
    form = crud.create(db.person, next=URL('index'), message=T("record
created"))
    persons = crud.select(db.person, fields=['name'],
headers={'name': 'Name'})

    return dict(form=form, persons=persons)


In the view:
{{extend 'layout.html'}}
{{=form}}



Thanks very much for your time.





On Jan 10, 4:14 pm, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> Nothing. Can we see more of the code?
>
> On Jan 10, 1:47 pm, AW <a2y2w...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I tried to run the .../default/people request after I put a simple
> > view in place:
>
> > {{extend 'layout.html'}}
>
> > {{=form}}
>
> > And I just got this error message:
> > "
> > Error snapshot
> > Detailed traceback description
> > Exception: <type 'exceptions.KeyError'>('person')
> > "
>
> > The problem is supposed to be in this line:
> > persons = crud.select(db.person, fields=['name'],
> > headers={'person.name': 'Name'})
>
> > What's wrong with that? Thanks.

Reply via email to