InvalidBasesError: Cannot resolve bases for []

后端 未结 14 989
遥遥无期
遥遥无期 2021-02-03 23:03

When I run tests I get this error during database initialization:

django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [

        
14条回答
  •  暖寄归人
    2021-02-03 23:25

    If this is only happening when running python manage.py test (maybe because you have already made the necessary migrations), you should explicitly say that contrib.auth should not migrate in the MIGRATION_MODULES of your settings module.

    MIGRATION_MODULES(
            'auth': "contrib.auth.migrations_not_used_in_tests",
    )
    

提交回复
热议问题