Close

For effective work on the site, cookies and the processing of personal data are used. By using this site, you agree to the terms of use of the site. More

Quote of day

Vivazzi.ru

Maltsev Artem's Personal Site

In this world, there is only one way to earn love - to stop demanding it and begin to give love, not hoping for gratitude.

Dale Carnegie

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',
    ...
)

Run makemigrations:

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.

Rate this article

0 from 5 (total 0 ratings)

You can send feedback, suggestions or comments on this article using this form:

Fields marked by star ( * ) is required.

Thank you for yor feedback!

Article Author

The right to use this article on this page http://vivazzi.ru/en/it/cannot-resolve-bases-for-pageuser/:

Permission is granted to copy an article with its author and reference to the original without using the parameter rel="nofollow" in tag <a>. Usage:

Article Author: Maltsev Artem
Link to article: <a href="http://vivazzi.ru/en/it/cannot-resolve-bases-for-pageuser/">http://vivazzi.ru/en/it/cannot-resolve-bases-for-pageuser/</a>

More: Terms of site usage

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

Comments: 0

You can leave a comment as an unregistered user. But by registering, you will be able to receive notifications of replies, and also have access to your personal account to view your comments.

To comment in one's own name you should log in or sign up in the usual way or through social networks:

Send

There is no search on this site, so I offer to use usual search engine, for example, Google, adding "vivazzi" after your request.

Try it