So its for that not two people can has the same session_ID and cannot send
the form?

2009/4/24 mdipierro <mdipie...@cs.depaul.edu>

>
> It is optional. If it is there is associate a unique ID to each form
> to prevent double form submission.
>
> Massimo
>
> On Apr 24, 2:02 pm, Pynthon <forumx...@gmail.com> wrote:
> > Hahaha, sorry for my bad English. The if form.accepts(request.vars):
> > means if the sended information passed the validation right? But what
> > does the session mean? I know what sessions are but why here?
> >
> > Thanks
> >
> > On Apr 24, 7:30 pm, Yannick <ytchatch...@gmail.com> wrote:
> >
> > > Oups sorry if i did understand your original question... I still don't
> > > see what it is that you don't understand...
> > > The view doesn't display ??
> >
> > > Yannick P.
> >
> > > On Apr 24, 11:45 am, Pynthon Pynthon <forumx...@gmail.com> wrote:
> >
> > > > Thanks, I understand that already but when I only do:
> > > > if form.accepts():
> >
> > > > Then I can't go to the view.
> >
> > > > 2009/4/24 Yannick <ytchatch...@gmail.com>
> >
> > > > > Hello Pynthon,
> >
> > > > > Request.vars : It is used to get the values of the form you send
> from
> > > > > the view in the server side
> > > > > Session: it is used to access values stored in your session (If
> any)
> > > > > in the server side
> >
> > > > > I hope it helps,
> > > > > Yannick P.
> >
> > > > > On Apr 24, 11:12 am, Pynthon <forumx...@gmail.com> wrote:
> > > > > > Hello I got this in my controller:
> >
> > > > > > def index():
> > > > > >     return("Hallo Wereld")
> >
> > > > > > def first():
> > > > > >     form = FORM(INPUT(_name = 'naam', requires = IS_NOT_EMPTY()),
> > > > > >                 INPUT(_type = 'submit'))
> > > > > >     if form.accepts(request.vars, session):
> > > > > >         session.naam = form.vars.naam
> > > > > >         redirect(URL(r = request, f = 'second'))
> >
> > > > > >     return dict(form = form)
> >
> > > > > > def second():
> > > > > >     if not session.naam:
> > > > > >         redirect(URL(r = request, f = first))
> > > > > >     return dict()
> >
> > > > > > def delete():
> > > > > >     session.naam = None
> > > > > >     return "Loguit"
> >
> > > > > > I created the delete option by myself =D (:P). However I have a
> > > > > > question about this piece of code:
> > > > > >  if form.accepts(request.vars, session):
> >
> > > > > > I know what form.accepts mean but what does the request.vars and
> > > > > > session?
> >
> > > > > > Thanks!
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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