summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 01bb271)
raw | patch | inline | side by side (parent: 01bb271)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 13 Sep 2002 04:57:38 +0000 (04:57 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 13 Sep 2002 04:57:38 +0000 (04:57 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1164 57a73879-2fb5-44c3-a270-3262357dd7e2
doc/customizing.txt | patch | blob | history |
diff --git a/doc/customizing.txt b/doc/customizing.txt
index 614e8f64445e5e39924a6fe9d915e5c4332a2e81..96d3229170a5bad4b33e557f008f916a610cee04 100644 (file)
--- a/doc/customizing.txt
+++ b/doc/customizing.txt
Customising Roundup
===================
-:Version: $Revision: 1.33 $
+:Version: $Revision: 1.34 $
.. This document borrows from the ZopeBook section on ZPT. The original is at:
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
`batching`_)
=============== ============================================================
+The form variable
+:::::::::::::::::
+
+The form variable is a little special because it's actually a python
+FieldStorage object. That means that you have two ways to access its
+contents. For example, to look up the CGI form value for the variable
+"name", use the path expression::
+
+ request/form/name/value
+
+or the python expression::
+
+ python:request.form['name'].value
+
+Note the "item" access used in the python case, and also note the explicit
+"value" attribute we have to access. That's because the form variables are
+stored as MiniFieldStorages. If there's more than one "name" value in
+the form, then the above will break since ``request/form/name`` is actually a
+*list* of MiniFieldStorages. So it's best to know beforehand what you're
+dealing with.
+
+
The db variable
~~~~~~~~~~~~~~~