我已逐步安装了许多内容http://www.flaskbb.org/first_steps.html。
当我使用python manage.py createall
时出现错误:
/home/test/test/flaskbb# python manage.py createall
Traceback (most recent call last):
File "manage.py", line 44, in <module>
app = create_app(Config)
File "/home/test/flaskbb/flaskbb/flaskbb/app.py", line 63, in create_app
configure_extensions(app)
File "/home/test/flaskbb/flaskbb/flaskbb/app.py", line 141, in configure_extensions
babel.init_app(app=app, default_domain=FlaskBBDomain(app))
TypeError: init_app() got an unexpected keyword argument 'default_domain'
我第二次尝试使用其他帐户。
root@debian:/home/debian# pip install -U flask-babelex
Requirement already up-to-date: flask-babelex in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: Flask in /usr/local/lib/python2.7/dist-packages (from flask-babelex)
Requirement already up-to-date: Babel>=1.0 in /usr/local/lib/python2.7/dist-packages (from flask-babelex)
Requirement already up-to-date: speaklater>=1.2 in /usr/local/lib/python2.7/dist-packages (from flask-babelex)
Requirement already up-to-date: Jinja2>=2.5 in /usr/local/lib/python2.7/dist-packages (from flask-babelex)
Requirement already up-to-date: Werkzeug>=0.7 in /usr/local/lib/python2.7/dist-packages (from Flask->flask-babelex)
Requirement already up-to-date: itsdangerous>=0.21 in /usr/local/lib/python2.7/dist-packages (from Flask->flask-babelex)
Requirement already up-to-date: pytz>=0a in /usr/local/lib/python2.7/dist-packages (from Babel>=1.0->flask-babelex)
Requirement already up-to-date: markupsafe in /usr/local/lib/python2.7/dist-packages (from Jinja2>=2.5->flask-babelex)
root@debian:/home/debian/flaskbb/flaskbb# python manage.py createall
Traceback (most recent call last):
File "manage.py", line 44, in <module>
app = create_app(Config)
File "/home/debian/flaskbb/flaskbb/flaskbb/app.py", line 63, in create_app
configure_extensions(app)
File "/home/debian/flaskbb/flaskbb/flaskbb/app.py", line 141, in configure_extensions
babel.init_app(app=app, default_domain=FlaskBBDomain(app))
TypeError: init_app() got an unexpected keyword argument 'default_domain'
还有同样的问题,您是否尝试在本地计算机上安装flaskbb? 成功还是失败?
root@debian:~# python
Python 2.7.3 (default, Mar 14 2014, 11:57:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import flask.ext.babelex
>>>
我可以导入它,也许其他问题导致错误。
答案 0 :(得分:1)
我已经分叉了扩展程序并提交了一个拉取请求,但它仍然未合并..现在你必须从这个存储库安装它:https://github.com/sh4nks/flask-babelex
你可以这样做:
pip install https://github.com/sh4nks/flask-babelex/tarball/master#egg=Flask-BabelEx
如果需要,您还可以升级整个依赖项:
pip install -r requirements.txt --upgrade
PS:FlaskBB尚未完成 - 但我感谢您的一切帮助! :)