~ntt-pf-lab/nova/monkey_patch_notification

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/doc/web/howto/listings/webquote.rtl

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from twisted.web.resource import Resource
 
2
 
 
3
def getQuote():
 
4
    return "An apple a day keeps the doctor away."
 
5
 
 
6
 
 
7
class QuoteResource(Resource):
 
8
 
 
9
    template render(self, request):
 
10
        """\
 
11
        <html>
 
12
        <head><title>Quotes Galore</title></head>
 
13
 
 
14
        <body><h1>Quotes</h1>"""
 
15
        getQuote()
 
16
        "</body></html>"
 
17
 
 
18
 
 
19
resource = QuoteResource()
 
20