comparison doc/customizing.txt @ 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 1d86402ce5e8
children 8e960088b44c
comparison
equal deleted inserted replaced
2044:8de56036480a 2047:9e72663e5671
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.93.2.7 $ 5 :Version: $Revision: 1.93.2.8 $
6 6
7 .. This document borrows from the ZopeBook section on ZPT. The original is at: 7 .. This document borrows from the ZopeBook section on ZPT. The original is at:
8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx 8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
9 9
10 .. contents:: 10 .. contents::
2130 2130
2131 <input type="hidden" name="@action" value="myaction"> 2131 <input type="hidden" name="@action" value="myaction">
2132 2132
2133 where "myaction" is the name you registered in the previous step. 2133 where "myaction" is the name you registered in the previous step.
2134 2134
2135 Actions may return content to the user
2136 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2137
2138 Actions generally perform some database manipulation and then pass control
2139 on to the rendering of a template in the current context (see `Determining
2140 web context`_ for how that works.) Some actions will want to generate the
2141 actual content returned to the user. Action methods may return their own
2142 content string to be displayed to the user, overriding the templating step.
2143 In this situation, we assume that the content is HTML by default. You may
2144 override the content type indicated to the user by calling ``setHeader``::
2145
2146 self.setHeader('Content-Type', 'text/csv')
2147
2148 This example indicates that the value sent back to the user is actually
2149 comma-separated value content (eg. something to be loaded into a
2150 spreadsheet or database).
2151
2135 2152
2136 Examples 2153 Examples
2137 ======== 2154 ========
2138 2155
2139 .. contents:: 2156 .. contents::

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