Type/to search
0
Follow
3
Followers
câu hỏi thiết lập fmz_extend_api_demo
Help
Created 2021-11-11 09:14:43  
 1
 1082

Hôm nay, tôi đã thử demo fmz_extend_api_demo chính thức và thấy rằng khi chạy app.py cuối cùng, nó đã có một lỗi như sau:
/usr/lib/python2.7/site-packages/flask_sqlalchemy/init.py:794: FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future. Set it to True or False to suppress this warning.
'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '
Traceback (most recent call last):
File "app.py", line 152, in <module>
db.create_all()
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 963, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 955, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), **extra)
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 896, in get_engine
return connector.get_engine()
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 556, in get_engine
self._sa.apply_driver_hacks(self._app, info, options)
File "/usr/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 861, in apply_driver_hacks
info.database = os.path.join(app.root_path, info.database)
AttributeError: can't set attribute
Các bạn có vấn đề gì không, cảm ơn!

Related Recommendations
Comment
All comments (1)

    fmz_extend_api_demo 这个DEMO比较早,开源的,可以看源代码。

    5 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)