python-import
Cannot import name
Import error:
ImportError: cannot import name 'User'
Can you tell me how to fix it?
Main.py
from flask import Flask
f ... m app.models import User
def funct(): #declaration
Models.py
from app.main import db
class User(db.Model): #declaration
Python: Import via init.py it works in the IDE, but not on the command line
I have a bot that is based on a ready-made project, and now it's time to write my own. I decided to do the same import of plu ... ", "tst"),
)
self.user_plugins = (
PairUP("pair test", "pt"),
)
UPD: Sorry for using images, corrected