-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xadmin+django2.0删除用户报错,get_deleted_objects() takes 3 positional arguments but 5 were given #622
Comments
@flyingdown django2.0.*是这样(https://github.com/django/django/blob/stable/2.0.x/django/contrib/admin/utils.py) django2.1.*是这样(https://github.com/django/django/blob/stable/2.1.x/django/contrib/admin/utils.py) 然后xadmin2.0.1里面是这样的
但是这样还是没有办法处理, 原因就是上面说的2.0.*和2.1.*不一样,如果能根据参数个数执行代码的话会比判断版本好一点,比如 get_deleted_objects.code.co_argcount == 3 |
怎么解决阿 |
django2.x 版本的可以试试 |
试了django2 分支 还是没有解决这个问题 |
找到问题了 我用的是 django2.0.5 get_deleted_objects() 还是需要5个参数,手动改一下就好了 |
最新版的Django已经解决此问题 |
get_deleted_objects这个方法,在1.x时确实是5个参数,2.0改了,删除数据就报错。
The text was updated successfully, but these errors were encountered: