Forums

Unable to render html files

I am trying to run this code

from flask import Flask, render_template
app = Flask(__name__)

@app.route('/')
def home():
   return render_template('home.html')
if __name__ == '__main__':
   app.run()

enter image description here

The html file is located in: /home/CollinsTechWrite/mysite/home.html

But I am getting this error

Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

I am on free plan. Is there anything else I need to do to get the html page to load?

Try using absolute path to the template.