Edgewall Software

Changes between Version 79 and Version 80 of GenshiTutorial


Ignore:
Timestamp:
Sep 5, 2007, 12:38:58 AM (17 years ago)
Author:
cmlenz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GenshiTutorial

    v79 v80  
    369369        return stream.render('html', doctype='html')
    370370}}}
     371
     372 '''Note:''' we explicitly check for the HTTP request method here. And only if it's a “POST” request we actually go and look into the submitted data and add it to the database. That's because “GET” requests in HTTP are [http://www.w3.org/DesignIssues/Axioms#state supposed to be idempotent], that is, they should not have side effects. If we didn't make this check, we'd also be accepting requests that would change the database via “GET” or “HEAD”, thereby violating the rules.
    371373
    372374And of course we'll need to add a template to display the submission form. In `geddit/templates`, create a file named `submit.html`, with the following content: