InvalidBasesError: Cannot resolve bases for [<ModelState: 'cms.PageUser'>]
July 3, 2016, 10:19 p.m.
If you get this error:
django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<ModelState: 'cms.PageUser'>]
Then the problem is in 0001_initial.py migration of django cms. This migration try to refer to migrations of User model:
class Migration(migrations.Migration): dependencies = [ ('auth', '__first__'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), # refer to migrations of User model ('sites', '__first__'), ] ...
And doesn't find, because there aren't migrations yet for our model of custom user. So before the creations of migrations you need comment djangocms_text_ckeditor and cms applications in settings.py:
INSTALLED_APPS = ( ... 'django.contrib.auth', 'my_custom_auth', # our custom User model ... # 'djangocms_text_ckeditor', # 'cms', ... )
manage.py@my_project > makemigrations Migrations for 'my_custom_auth': 0001_initial.py: - Create model User
And then remove comment for djangocms_text_ckeditor and cms applications. That's all.
Do you need to develop yourself or do you want to earn money?
Are you looking for good IT services or books? Save your time and look at my compilation of recommendations, which I use every day.
Go to recommendations