Django 1.8 + CMS error: django.db.utils.ProgrammingError: relationship "cms_cmsplugin" does not exist

I got the same error 3 times already, before I could not find a solution on Google here, and I think that I am not the only one who got it.

From the new installation, I install the django-cms plugin and many of its plugins at the same time.

After launch

python manage.py makemigrations
python manage.py migrate

I get this error: django.db.utils.ProgrammingError: relation "cms_cmsplugin" does not exist

+4
source share
4 answers

Well, what I do is delete all cms plugins except for 'cms' itself, run python manage.py migrateadd all plugins again and change againpython manage.py migrate

It seems that Django is trying to create tables for plugins before the 'cms' one application

, , .

, pip . txt , .

+3

, ... , django 1.7, , , , MIGRATION_MODULE settings.py: 'djangocms_text_ckeditor': 'djangocms_text_ckeditor.migrations_django',

, . , djangocms_text_ckeditor db

+2

,

(app- > migrations) , __init__ python manage.py migrate .

0
source

I just comment on all my django cms custom plugins in django settings and transfer it. Then uncomment them and migrate again.

# setting.py
INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.admin',
    'django.contrib.sites',
    ...
    # 'MY_DJANGO_CMS_PLUGIN',
)

After that do

python manage.py migrate

And uncomment MY_DJANGO_CMS_PLUGINand run the migration again.

0
source

All Articles