django问题

1.super(type,obj):obj must be an instance or subtype of type

  解决方法:

 这行:

return super(SearchAndCheckXadmin, self).post(request,args,kwargs)  # 必须调用SearchAndCheckXadmin父类,再调用post方法,否则会报错

应该为:
return super(SearchAndCheckXadmin, self).post(request,*args,**kwargs)  # 必须调用SearchAndCheckXadmin父类,再调用post方法,否则会报错

注意参数的引用和调用的是本身的模块,即:
  一、“SearchAndCheckXadmin”一定是本身的类名字,不要写成别的类的名字;
  二、post参数一定是post(request,*args,**kwargs),不要写成post(request,args,kwargs)

原文地址:https://www.cnblogs.com/jingzaixin/p/11556716.html