hello iam trying to get a currnet_user information in my views
and i include from users.models import *
then in my code return return current_user;
<
Its one year late but if someone doesn't find the solution in the given answers may be this can solve the problem -
I had this same problem with my class which was inherited from db.Model (of flask_sqlalchemy).
My code looked like this -
class MasterDB(db.Model):
__tablename__ = 'masterdb'
__table_args__ = {'schema': 'schema_any'}
...
...
Resolved it by specifying the abstract property to True in the class variable list. Add it in the class variable list like this and it should work -
class MasterDB(db.Model):
__tablename__ = 'masterdb'
__table_args__ = {'schema': 'schema_any'}
__abstract__ = True