~ubuntu-branches/ubuntu/gutsy/libapache2-mod-python/gutsy

« back to all changes in this revision

Viewing changes to doc-html/tut-pub.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2006-03-20 19:05:14 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060320190514-7gcx7mdusfp5it8r
Tags: 3.1.4-0ubuntu1
* Merge with Debian a little bit harder, minimising our diffs a bit.
* New upstream release, containing no changes other than the security
  fix for CVE-2005-0088 and an externally-visible module version bump.
* Tweak configure.in with upstream fix to resolve FTBFS with bash 3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
2
<html>
3
3
<head>
 
4
<link rel="STYLESHEET" href="modpython.css" type='text/css' />
 
5
<link rel="first" href="modpython.html" title='Mod_python Manual' />
 
6
<link rel='contents' href='contents.html' title="Contents" />
 
7
<link rel='index' href='genindex.html' title='Index' />
 
8
<link rel='last' href='about.html' title='About this document...' />
 
9
<link rel='help' href='about.html' title='About this document...' />
 
10
<link rel="next" href="tut-overview.html" />
 
11
<link rel="prev" href="tutorial.html" />
 
12
<link rel="parent" href="tutorial.html" />
 
13
<link rel="next" href="tut-overview.html" />
 
14
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />
 
15
<meta name='aesop' content='information' />
4
16
<title>3.1 A Quick Start with the Publisher Handler</title>
5
 
<META NAME="description" CONTENT="3.1 A Quick Start with the Publisher Handler">
6
 
<META NAME="keywords" CONTENT="modpython">
7
 
<META NAME="resource-type" CONTENT="document">
8
 
<META NAME="distribution" CONTENT="global">
9
 
<link rel="STYLESHEET" href="modpython.css">
10
 
<link rel="first" href="modpython.html">
11
 
<link rel="contents" href="contents.html" title="Contents">
12
 
<link rel="index" href="genindex.html" title="Index">
13
 
<LINK REL="next" href="tut-overview.html">
14
 
<LINK REL="previous" href="tutorial.html">
15
 
<LINK REL="up" href="tutorial.html">
16
 
<LINK REL="next" href="tut-overview.html">
17
17
</head>
18
18
<body>
19
19
<DIV CLASS="navigation">
 
20
<div id='top-navigation-panel' xml:id='top-navigation-panel'>
20
21
<table align="center" width="100%" cellpadding="0" cellspacing="2">
21
22
<tr>
22
 
<td><A href="tutorial.html"><img src="icons/previous.gif"
23
 
  border="0" height="32"
24
 
  alt="Previous Page" width="32"></A></td>
25
 
<td><A href="tutorial.html"><img src="icons/up.gif"
26
 
  border="0" height="32"
27
 
  alt="Up One Level" width="32"></A></td>
28
 
<td><A href="tut-overview.html"><img src="icons/next.gif"
29
 
  border="0" height="32"
30
 
  alt="Next Page" width="32"></A></td>
 
23
<td class='online-navigation'><a rel="prev" title="3. Tutorial"
 
24
  href="tutorial.html"><img src='previous.png'
 
25
  border='0' height='32'  alt='Previous Page' width='32' /></A></td>
 
26
<td class='online-navigation'><a rel="parent" title="3. Tutorial"
 
27
  href="tutorial.html"><img src='up.png'
 
28
  border='0' height='32'  alt='Up One Level' width='32' /></A></td>
 
29
<td class='online-navigation'><a rel="next" title="3.2 Quick Overview of"
 
30
  href="tut-overview.html"><img src='next.png'
 
31
  border='0' height='32'  alt='Next Page' width='32' /></A></td>
31
32
<td align="center" width="100%">Mod_python Manual</td>
32
 
<td><A href="contents.html"><img src="icons/contents.gif"
33
 
  border="0" height="32"
34
 
  alt="Contents" width="32"></A></td>
35
 
<td><img src="icons/blank.gif"
36
 
  border="0" height="32"
37
 
  alt="" width="32"></td>
38
 
<td><A href="genindex.html"><img src="icons/index.gif"
39
 
  border="0" height="32"
40
 
  alt="Index" width="32"></A></td>
 
33
<td class='online-navigation'><a rel="contents" title="Table of Contents"
 
34
  href="contents.html"><img src='contents.png'
 
35
  border='0' height='32'  alt='Contents' width='32' /></A></td>
 
36
<td class='online-navigation'><img src='blank.png'
 
37
  border='0' height='32'  alt='' width='32' /></td>
 
38
<td class='online-navigation'><a rel="index" title="Index"
 
39
  href="genindex.html"><img src='index.png'
 
40
  border='0' height='32'  alt='Index' width='32' /></A></td>
41
41
</tr></table>
42
 
<b class="navlabel">Previous:</b> <a class="sectref" href="tutorial.html">3. Tutorial</A>
43
 
<b class="navlabel">Up:</b> <a class="sectref" href="tutorial.html">3. Tutorial</A>
44
 
<b class="navlabel">Next:</b> <a class="sectref" href="tut-overview.html">3.2 Quick Overview of</A>
45
 
<br><hr>
 
42
<div class='online-navigation'>
 
43
<b class="navlabel">Previous:</b>
 
44
<a class="sectref" rel="prev" href="tutorial.html">3. Tutorial</A>
 
45
<b class="navlabel">Up:</b>
 
46
<a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A>
 
47
<b class="navlabel">Next:</b>
 
48
<a class="sectref" rel="next" href="tut-overview.html">3.2 Quick Overview of</A>
 
49
</div>
 
50
<hr /></div>
46
51
</DIV>
47
52
<!--End of Navigation Panel-->
48
53
 
49
 
<H1><A NAME="SECTION005100000000000000000">&nbsp;</A>
 
54
<H1><A NAME="SECTION005100000000000000000"></A><A NAME="tut-pub"></A>
50
55
<BR>
51
56
3.1 A Quick Start with the Publisher Handler
52
57
</H1>
64
69
need the following lines in your config:
65
70
 
66
71
<P>
67
 
<dl><dd><pre class="verbatim">
 
72
<div class="verbatim"><pre>
68
73
  AddHandler mod_python .py
69
74
  PythonHandler mod_python.publisher
70
75
  PythonDebug On
71
 
</pre></dl>
 
76
</pre></div>
72
77
 
73
78
<P>
74
79
The following example will demonstrate a simple feedback form. The
82
87
Here is the html for the form:
83
88
 
84
89
<P>
85
 
<dl><dd><pre class="verbatim">
 
90
<div class="verbatim"><pre>
86
91
  &lt;html&gt;
87
92
      Please provide feedback below:
88
93
  &lt;p&gt;                           
95
100
 
96
101
  &lt;/form&gt;
97
102
  &lt;/html&gt;
98
 
</pre></dl>
 
103
</pre></div>
99
104
 
100
105
<P>
101
106
Note the <code>action</code> element of the <code>&lt;form&gt;</code> tag points to
103
108
<span class="file">form.py</span>, like this:
104
109
 
105
110
<P>
106
 
<dl><dd><pre class="verbatim">
 
111
<div class="verbatim"><pre>
107
112
import smtplib
108
113
 
109
114
WEBMASTER = "webmaster"   # webmaster e-mail
148
153
&lt;/html&gt;""" % name
149
154
 
150
155
    return s
151
 
</pre></dl>
 
156
</pre></div>
152
157
 
153
158
<P>
154
159
When the user clicks the Submit button, the publisher handler will
185
190
<P>
186
191
 
187
192
<DIV CLASS="navigation">
188
 
<p><hr>
 
193
<div class='online-navigation'>
 
194
<p></p><hr />
189
195
<table align="center" width="100%" cellpadding="0" cellspacing="2">
190
196
<tr>
191
 
<td><A href="tutorial.html"><img src="icons/previous.gif"
192
 
  border="0" height="32"
193
 
  alt="Previous Page" width="32"></A></td>
194
 
<td><A href="tutorial.html"><img src="icons/up.gif"
195
 
  border="0" height="32"
196
 
  alt="Up One Level" width="32"></A></td>
197
 
<td><A href="tut-overview.html"><img src="icons/next.gif"
198
 
  border="0" height="32"
199
 
  alt="Next Page" width="32"></A></td>
 
197
<td class='online-navigation'><a rel="prev" title="3. Tutorial"
 
198
  href="tutorial.html"><img src='previous.png'
 
199
  border='0' height='32'  alt='Previous Page' width='32' /></A></td>
 
200
<td class='online-navigation'><a rel="parent" title="3. Tutorial"
 
201
  href="tutorial.html"><img src='up.png'
 
202
  border='0' height='32'  alt='Up One Level' width='32' /></A></td>
 
203
<td class='online-navigation'><a rel="next" title="3.2 Quick Overview of"
 
204
  href="tut-overview.html"><img src='next.png'
 
205
  border='0' height='32'  alt='Next Page' width='32' /></A></td>
200
206
<td align="center" width="100%">Mod_python Manual</td>
201
 
<td><A href="contents.html"><img src="icons/contents.gif"
202
 
  border="0" height="32"
203
 
  alt="Contents" width="32"></A></td>
204
 
<td><img src="icons/blank.gif"
205
 
  border="0" height="32"
206
 
  alt="" width="32"></td>
207
 
<td><A href="genindex.html"><img src="icons/index.gif"
208
 
  border="0" height="32"
209
 
  alt="Index" width="32"></A></td>
 
207
<td class='online-navigation'><a rel="contents" title="Table of Contents"
 
208
  href="contents.html"><img src='contents.png'
 
209
  border='0' height='32'  alt='Contents' width='32' /></A></td>
 
210
<td class='online-navigation'><img src='blank.png'
 
211
  border='0' height='32'  alt='' width='32' /></td>
 
212
<td class='online-navigation'><a rel="index" title="Index"
 
213
  href="genindex.html"><img src='index.png'
 
214
  border='0' height='32'  alt='Index' width='32' /></A></td>
210
215
</tr></table>
211
 
<b class="navlabel">Previous:</b> <a class="sectref" href="tutorial.html">3. Tutorial</A>
212
 
<b class="navlabel">Up:</b> <a class="sectref" href="tutorial.html">3. Tutorial</A>
213
 
<b class="navlabel">Next:</b> <a class="sectref" href="tut-overview.html">3.2 Quick Overview of</A>
214
 
<hr>
215
 
<span class="release-info">Release 3.1.3, documentation updated on February 17, 2004.</span>
 
216
<div class='online-navigation'>
 
217
<b class="navlabel">Previous:</b>
 
218
<a class="sectref" rel="prev" href="tutorial.html">3. Tutorial</A>
 
219
<b class="navlabel">Up:</b>
 
220
<a class="sectref" rel="parent" href="tutorial.html">3. Tutorial</A>
 
221
<b class="navlabel">Next:</b>
 
222
<a class="sectref" rel="next" href="tut-overview.html">3.2 Quick Overview of</A>
 
223
</div>
 
224
</div>
 
225
<hr />
 
226
<span class="release-info">Release 3.1.3, documentation updated on January 29, 2005.</span>
216
227
</DIV>
217
228
<!--End of Navigation Panel-->
218
229