Richard, I've run your app in your attachment. And it worked! I guess the reason of my struggle is that my own database was messed up perhaps.
Thanks very much for your help. I appreciate that. On Jan 29, 10:23 pm, Richard Vézina <[email protected]> wrote: > I see no problem!! > > I took your code and build this app : see attach. > > Try to clean up you database folder to force web2py to recreate the whole > database SQLite file... > > Or start from the app I send to you. > > Richard > > > > > > > > On Sat, Jan 29, 2011 at 7:01 PM, AW <[email protected]> wrote: > > No one has tried that code example? > > > On Jan 18, 1:06 am, AW <[email protected]> wrote: > > > 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 <[email protected]> > > > wrote: > > > > > Nothing. Can we see more of the code? > > > > > On Jan 10, 1:47 pm, AW <[email protected]> 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. > > > > web2py.app.aw_test.w2p > 160KViewDownload

