问题:运行python3 manage命令.
Django报错RuntimeError: class not set defining ‘AbstractBaseUser’ as <class ‘django.contrib.auth.base_user.AbstractBaseUser’>. Was classcell propagated to type.new?
解决方法:
进入D:\dangxin\autoTest\Lib\site-packages\django\db\models在base.py文件中增加以下代码:
new_attrs = {‘module’: module}
classcell = attrs.pop(‘classcell’, None)
if classcell is not None:
new_attrs[‘classcell’] = classcell
new_class = super_new(cls, name, bases, new_attrs)