~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to twisted/web/demo.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-01-17 14:52:35 UTC
  • mfrom: (1.1.5 upstream) (2.1.2 etch)
  • Revision ID: james.westby@ubuntu.com-20070117145235-btmig6qfmqfen0om
Tags: 2.5.0-0ubuntu1
New upstream version, compatible with python2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
 
3
# See LICENSE for details.
 
4
 
 
5
 
 
6
"""I am a simple test resource.
 
7
"""
 
8
 
 
9
from twisted.python import log
 
10
from twisted.web import static
 
11
 
 
12
class Test(static.Data):
 
13
    isLeaf = True
 
14
    def __init__(self):
 
15
        static.Data.__init__(
 
16
            self,
 
17
            """
 
18
            <html>
 
19
            <head><title>Temporary Test</title><head>
 
20
            <body>
 
21
            
 
22
            Hello!  This is a temporary test until a more sophisticated form
 
23
            demo can be put back in using more up-to-date Twisted APIs.
 
24
            
 
25
            </body>
 
26
            </html>
 
27
            """,
 
28
            "text/html")
 
29