I am trying to use Flask to render an HTML template. I had it working great and now each time I get a 500 Internal Server Error
. If I replace the render_template
function just a string, things work fine. What am I doing wrong?
init.py :
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def homepage():
return render_template("main.html")
if __name__ == "__main__":
app.run()
main.html in /templates/
<!DOCTYPE html>
<html lang="en">
<p>test</p>
</html>