Flask confusion with app

I think the main confusion is in the line:

from app import app

You have a python package (a folder with __init__.py file) named “app”. From this folder, you are now importing the variable “app” that you defined below in __init__.py file:

app = Flask(__name__)

Rename the folder from app to say “myproject”. Then you will call

from myproject import app

Also, you will import views as

from myproject import views

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)