Error While Importing Module App Using From Flask.app Import Db
I'm new to flask, and have problem with importing db while running from python console/cmd. I'm facing this error : In[67]: os.getcwd() Out[67]: 'C:\\Users\\Desktop\\Python\\Flask
Solution 1:
there is a problem when importing module fix this....
inside Flask remove the __init_.py here u didnt want a init file.if the Flask folder is the root folder others are sub folders inside it I guess your main file is Flask.py. So change the
fromFlask.appimport db
to
from app import db
considering db is declared inside app/init.py
Post a Comment for "Error While Importing Module App Using From Flask.app Import Db"