techwithtim / Flask-Web-App-Tutorial

Code for the note storing flask web app made during a YouTube video.
918 stars 1.01k forks source link

NameError #116

Closed Emannual20 closed 1 year ago

Emannual20 commented 1 year ago

I was following the tutorial pretty closely until the part about templates. After importing render_template from flask, I typed return render_template("home.html") in the views.py folder as per his video instructions. However, when running the main.py file, I get thrown an error whereby the name 'render_template' is not defined. After looking up online resources for help, they said the issue resides in whether or not I actually imported the right module which clearly I did at the top of my views folder right next to Blueprint (from flask import Blueprint, render_template) . If anyone knows a solution to this, do drop a message, thank you.