On Sat, Jan 29, 2011 at 10:31 PM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

>
>
> On Tue, Jan 18, 2011 at 1:06 AM, AW <a2y2w...@gmail.com> 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'})
>>
>
> I just saw you have changed the line above compared to your first post...
> Did the app was still not working or you just sent the corrected code??
>
> Richard
>
>>
>>    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