get_deleted_objects() takes 3 positional arguments but 5 were given

django 的 xadmin 报错 get_deleted_objects() takes 3 positional arguments but 5 were given

  • 把 xadmin\views\delete.py 34行
 (self.deleted_objects, model_count, self.perms_needed, self.protected) = get_deleted_objects(
            [self.obj], self.opts, self.request.user, self.admin_site, using)
  • 改成
      (self.deleted_objects, model_count, self.perms_needed, self.protected) = get_deleted_objects(
            [self.obj], self.request.user, self.admin_site)

你可能感兴趣的:(python)