Dear Web2py users, I have started playing around with Web2py. I am reading various parts of the book. I am very satisfied with the framework and I find the atmosphere of this mailing list very friendly. Thanks.
I have some more questions about the book. 1) Sometimes I see in the documentation "if form.process().accepted:" and sometimes "if form.accepts(request.vars, session):". What's the difference between the two ? Actually the book I am reading is a few months old, and it seems that since it was published, it has been quite modified. I have seen that in chapter 3, all "if form.accepts(request.vars, session):" have been replaced by "if form.process().accepted:". What's the reason for that ? 2) On page 109 ( http://www.web2py.com/book/default/chapter/03#An-Image-Blog ), I have not really understood the following sentence : "Line 9 processes the submitted form (the submitted form variables are in request.vars) within the current session (the session is used to prevent double submissions, and to enforce navigation)." Line 9 refers to : "form.accepts(request.vars, session):" Would it be different if I would just write : "form.accepts(request.vars):" ? I think I understand why using the session prevents double submissions but I am not sure. 3) On page 108 ( http://www.web2py.com/book/default/chapter/03#An-Image-Blog ), there is written : if form.process().accepted: response.flash = 'your comment is posted' On page 112 ( http://www.web2py.com/book/default/chapter/03#Adding-CRUD ), there is written : form = SQLFORM(table) if form.process().accepted: session.flash = '...' Why is it sometimes "response.flash" and sometimes "session.flash" ? Thanks in advance, Archibald