我正在尝试在此过程中更新我的依赖项,我还将flask_admin
从1.0.8更新到1.5.0。但是,当我在生产中部署时,这种变化给了我一个问题。管理页面给我状态代码500.当我查看堆栈跟踪时,它看起来像这样:
追踪(最近一次呼叫最后一次):
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask_restful/__init__.py", line 273, in error_router
return original_handler(e)
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/lyftflask/__init__.py", line 187, in decorated
return f(*args, **kwargs)
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask_admin/base.py", line 69, in inner
return self._run_view(f, *args, **kwargs)
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask_admin/base.py", line 368, in _run_view
return fn(self, *args, **kwargs)
File "/srv/venvs/service/trusty/service_venv/local/lib/python2.7/site-packages/flask_admin/model/base.py", line 1882, in index_view
view_args.search, view_args.filters, page_size=page_size)
TypeError: get_list() got an unexpected keyword argument 'page_size'
以下是我最新的依赖项:
flask-admin==1.5.0
flask-mongoengine==0.9.3
flask-restful==0.3.6
flask-triangle==0.5.4
Flask-WTF==0.14.2
flask-script==2.0.6
Flask-Assets==0.12
Flask==0.12.1
基于堆栈跟踪,看起来有一些不兼容问题,但我无法弄清楚。我试着查看flask-admin
发布页面,但我没有注意到任何内容。