Skip to content

Commit

Permalink
minor typos
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Apr 2, 2013
1 parent 21f3e9c commit 6896c13
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions sources/29-web2py-english/01.markmin
Expand Up @@ -670,6 +670,7 @@ Ryan Seto,
Salomon Derossi,
Sam Sheftel,
Scott Roberts,
Sebastian Ortiz,
Sergey Podlesnyi,
Sharriff Aina,
Simone Bizzotto,
Expand Down
4 changes: 2 additions & 2 deletions sources/29-web2py-english/03.markmin
Expand Up @@ -714,8 +714,8 @@ db(db.image.id==...).select().first()
The "download" action expects a filename in ``request.args(0)``, builds a path to the location where that file is supposed to be, and sends it back to the client. If the file is too large, it streams the file without incurring any memory overhead.

Notice the following statements:
- Line 7 creates an insert form SQLFORM for the ``db.post`` table using only the specified fields.
- Line 8 sets the value for the reference field, which is not part of the input form because it is not in the list of fields specified above.
- Line 8 creates an insert form SQLFORM for the ``db.post`` table using only the specified fields.
- Line 7 sets the default value for the reference field, which is not part of the input form because it is not in the list of fields specified above.
- 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). If the submitted form variables are validated, the new comment is inserted in the ``db.post`` table; otherwise the form is modified to include error messages (for example, if the author's email address is invalid). This is all done in line 9!.
- Line 10 is only executed if the form is accepted, after the record is inserted into the database table. ``response.flash`` is a web2py variable that is displayed in the views and used to notify the visitor that something happened.
- Line 11 selects all comments that reference the current image.
Expand Down

0 comments on commit 6896c13

Please sign in to comment.