changeset 2047:9e72663e5671 maint-0.6

*** empty log message ***
author Richard Jones <richard@users.sourceforge.net>
date Wed, 25 Feb 2004 04:24:48 +0000
parents 8de56036480a
children c0961f42d8f3
files doc/customizing.txt
diffstat 1 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/doc/customizing.txt	Tue Feb 24 23:49:52 2004 +0000
+++ b/doc/customizing.txt	Wed Feb 25 04:24:48 2004 +0000
@@ -2,7 +2,7 @@
 Customising Roundup
 ===================
 
-:Version: $Revision: 1.93.2.7 $
+:Version: $Revision: 1.93.2.8 $
 
 .. This document borrows from the ZopeBook section on ZPT. The original is at:
    http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -2132,6 +2132,23 @@
 
 where "myaction" is the name you registered in the previous step.
 
+Actions may return content to the user
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Actions generally perform some database manipulation and then pass control
+on to the rendering of a template in the current context (see `Determining
+web context`_ for how that works.) Some actions will want to generate the
+actual content returned to the user. Action methods may return their own
+content string to be displayed to the user, overriding the templating step.
+In this situation, we assume that the content is HTML by default. You may
+override the content type indicated to the user by calling ``setHeader``::
+
+   self.setHeader('Content-Type', 'text/csv')
+
+This example indicates that the value sent back to the user is actually
+comma-separated value content (eg. something to be loaded into a
+spreadsheet or database).
+
 
 Examples
 ========

Roundup Issue Tracker: http://roundup-tracker.org/