Sophie

Sophie

distrib > Mageia > 6 > x86_64 > by-pkgid > 09408f3c1571cbb746da49a1d2f22702 > files > 3269

python-twisted-17.5.0-1.mga6.x86_64.rpm

from twisted.web.resource import Resource

def getQuote():
    return "An apple a day keeps the doctor away."


class QuoteResource(Resource):

    template render(self, request):
        """\
        <html>
        <head><title>Quotes Galore</title></head>

        <body><h1>Quotes</h1>"""
        getQuote()
        "</body></html>"


resource = QuoteResource()