>From Clientes/index (a list of clients) I want to pick up a record and edit
it.
with the earlier configuration I get the record but I can't edit it.

How I merge my confs with your suggestion?

maybe would be better explain everything again but if you can understand..

thanks
CA

2009/9/10 mdipierro <mdipie...@cs.depaul.edu>

>
> That is all. When you visit the page there will be a create form in
> the page.
> Perhaps I misunderstand what you want to do.
>
> On Sep 10, 8:14 am, Carlos Aboim <abo...@gmail.com> wrote:
> > I'm sorry I didn't get the point.
> >
> > What should I do with {{=crud.update(db.cliente, cliente)}}
> > I put it in the view and...
> >
> > thank you
> > CA
> >
> > 2009/9/9 mdipierro <mdipie...@cs.depaul.edu>
> >
> >
> >
> > > {{=crud.update(db.cliente,cliente)}}
> >
> > > On Sep 9, 9:50 am, Carlos Aboim <abo...@gmail.com> wrote:
> > > > Hey Massimo,
> > > > thanks for your reply,
> > > > I've changed the code as you said and now it's ok. But I whould like
> to
> > > edit
> > > > the record.
> > > > 1. How do I do to edit that record.
> > > > 2. How do I change the order of apearence of fields, because the
> fields
> > > > seams to be apearing in a random away maybe not...
> >
> > > > thanks again
> > > > CAboim
> >
> > > > 2009/9/9 mdipierro <mdipie...@cs.depaul.edu>
> >
> > > > > The problem is that you return cliente=clientes[0] i.e. a single
> > > > > client, not multimple Rows, but in view you loop over c{{for
> cliente
> > > > > in cliente:}} as if cliente were Rows and not a single cliente.
> >
> > > > > My advice is:
> >
> > > > > def show():
> > > > >    ''' ver cliente '''
> > > > >    nome = request.vars.nome
> > > > >    clientes=db(db.cliente.nome==nome).select(limitby=(0,1))
> > > > >    if not len(clientes): redirect(URL(r=request, f='clientes'))
> > > > >    return dict(cliente=clientes[0])
> >
> > > > > {{extend 'layout.html'}}
> >
> > > > > <h1>Clientes arquivados.</h1>
> > > > >    <h2>{{=cliente.id}}</h2>
> > > > >    <b>Nome: {{=A(cliente.nome, _href=URL(r=request,
> f='show?nome=%s'
> > > > > % cliente.nome))}}</b> <br />
> > > > >    <b>Contacto:</b> {{=cliente.contacto}}<br />
> > > > >    <b>Email:</b> {{=cliente.email}}<br />
> > > > >    <b>Morada:</b> {{=cliente.morada}}<br />
> > > > >    <br />
> >
> > > > > Massimo
> >
> > > > > On Sep 9, 6:51 am, Carlos Aboim <abo...@gmail.com> wrote:
> > > > > > Hi,
> >
> > > > > > I have the next files.
> > > > > > I want to retrieve just a record from a list in database.
> >
> > > > > > controller   --->  http://dpaste.com/hold/91386/
> > > > > > view           --->  http://dpaste.com/hold/91385/
> >
> > > > > > but it gives me the next error:
> >
> > > > > > error output ---> invalid function
> >
> > > > > > by the way, if the retrieved info has a special caracter it
> doesnt
> > > > > > render giving a unicode error. How do I declare a coding other
> than
> > > in
> > > > > > the controller that is already done?!
> >
> > > > > > thank you in advanced
> > > > > > Carlos Aboim
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to