0

Currently i am doing this

from twisted.web.resource import Resource

class MyPostResource(Resource):
    def render_GET(self, request):
        html_file = open("form.html","rb")
        html_file = html_file.readlines()
        html_file = "\n".join(html_file)
        return html_file

what is the proper way to render a html file in twisted resource in python?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

0 Answers0