問題:
qs = super(BnnerCourseAdmin, self).queryset()
TypeError: super(type, obj): obj must be an instance or subtype of type
出現問題原因:
在類的繼承時候,super方法繼承時間,BnnerCourseAdmin名字並不是本類名字可能是父類名字,需要把名字改成本類名字
那,如何解決?
把 BnnerCourseAdmin名字改寫成 定義supper類的本名,而不是父類名字
問題:
qs = super(BnnerCourseAdmin, self).queryset()
TypeError: super(type, obj): obj must be an instance or subtype of type
出現問題原因:
在類的繼承時候,super方法繼承時間,BnnerCourseAdmin名字並不是本類名字可能是父類名字,需要把名字改成本類名字
那,如何解決?
把 BnnerCourseAdmin名字改寫成 定義supper類的本名,而不是父類名字
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。