Thanks for the hint, vars seems definetly the better choice.
But the db part drives me to desperation:
doing in controller:
uname=request.vars.uname
query=db(db.user.name==uname)
records=db(query).select()
the select statement already throws up an exception (key error key
(gluon)) or so
seems I won't discover my secret love to database programming
anymore :)
ciao
Stefan
On 2 Okt., 19:48, mdipierro <[email protected]> wrote:
> Mind that URLs are validate on input and if uname contains spaces
> things will not work because spaces will be replace by _. I suggest:
>
> <td>{{=A(uname, _href=URL(r=request, f='edit_user',vars=dict
> (uname=uname)))}}</td>
>
> and in edit_user
>
> rows=db(db.....==request.vars.uname).select()
>
> On Oct 2, 12:42 pm, znafets <[email protected]> wrote:
>
> > Nah, don't worry, I'll figure that out somehow. Can't ask that much of
> > you.
>
> > Thank you very much for the offer though. I am a web2py rookie (just
> > started), never used django or alike.
>
> > So thanks again
>
> > ciao
> > Stefan
>
> > On 2 Okt., 19:22, Yarko Tymciurak <[email protected]> wrote:
>
> > > If no one else can help you, I'll put together an example for you tonight
> > > (tied up this afternoon)
>
> > > On Fri, Oct 2, 2009 at 12:07 PM, znafets <[email protected]> wrote:
>
> > > > > not sure why you think it doesn't work; it should work just fine:
>
> > > > > x = request.args[0]
> > > > > y = request.args[1]
>
> > > > well, as soon as I try something like args=[uname, uloc] in the view
> > > > it comes up with "Invalid request".
> > > > args=[uname] works just fine and can be retrieved via request.args[0]
>
> > > > working on linux (ubuntu karmic), python 2.5, web2py 1.67x
>
> > > > > > row=db(db.user.uname==request.args[0]).select()
>
> > > > can you give me a hand on this ? Trying to take the value which comes
> > > > back from the view (username) and can be retrieved form request.args
> > > > [0] and get the according record with all the it's fields to iterate
> > > > through it.
> > > > If it's not asked too much.
>
> > > > best regards
> > > > Stefan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---