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 [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
-~----------~----~----~----~------~----~------~--~---