table 'roles_users' is already defined for this MetaData instance

前端 未结 11 1001
执笔经年
执笔经年 2021-02-05 01:40

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;

<         


        
11条回答
  •  春和景丽
    2021-02-05 02:26

    I'm getting this error while running the flask app in development mode:

    FLASK_ENV=development flask run
    

    The dynamic reloading feature from flask apparently does reload the metadata instances as you might expect. Restarting the app as suggested by "Spcogg the second" resolves this issue for me!

提交回复
热议问题