demo.py 554 B

1234567891011121314151617181920212223242526
  1. # Copyright (c) Twisted Matrix Laboratories.
  2. # See LICENSE for details.
  3. """
  4. I am a simple test resource.
  5. """
  6. from __future__ import absolute_import, division
  7. from twisted.web import static
  8. class Test(static.Data):
  9. isLeaf = True
  10. def __init__(self):
  11. static.Data.__init__(
  12. self,
  13. b"""
  14. <html>
  15. <head><title>Twisted Web Demo</title><head>
  16. <body>
  17. Hello! This is a Twisted Web test page.
  18. </body>
  19. </html>
  20. """,
  21. "text/html")