From 0ea56f4eb763830b2b209ba3e53ab418d3ae8681 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Sun, 3 Aug 2014 18:12:34 +0200 Subject: [PATCH] Support Django 1.7 migrations --- README.rst | 4 +++ .../migrations_django/0001_initial.py | 25 +++++++++++++++++++ .../migrations_django/__init__.py | 0 3 files changed, 29 insertions(+) create mode 100644 djangocms_text_ckeditor/migrations_django/0001_initial.py create mode 100644 djangocms_text_ckeditor/migrations_django/__init__.py diff --git a/README.rst b/README.rst index b38d60d..62f4ee3 100644 --- a/README.rst +++ b/README.rst @@ -19,6 +19,10 @@ This plugin requires `django CMS` 2.3 or higher to be properly installed. * In your projects `virtualenv`, run ``pip install djangocms-text-ckeditor``. * Add ``'djangocms_text_ckeditor'`` to your ``INSTALLED_APPS`` setting **BEFORE** the ``cms`` entry. +* If using Django 1.7 add ``'djangocms_text_ckeditor': 'djangocms_text_ckeditor.migrations_django',`` + to ``MIGRATION_MODULES`` (or define ``MIGRATION_MODULES`` if it does not exists); + when django CMS 3.1 will be released, migrations for Django 1.7 will be moved + to the standard location and the south-style ones to ``south_migrations``. * Run ``manage.py migrate djangocms_text_ckeditor``. Upgrading from ``cms.plugins.text`` diff --git a/djangocms_text_ckeditor/migrations_django/0001_initial.py b/djangocms_text_ckeditor/migrations_django/0001_initial.py new file mode 100644 index 0000000..6693a39 --- /dev/null +++ b/djangocms_text_ckeditor/migrations_django/0001_initial.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('cms', '__first__'), + ] + + operations = [ + migrations.CreateModel( + name='Text', + fields=[ + ('body', models.TextField(verbose_name='body')), + ('cmsplugin_ptr', models.OneToOneField(auto_created=True, primary_key=True, serialize=False, to='cms.CMSPlugin')), + ], + options={ + 'abstract': False, + }, + bases=('cms.cmsplugin',), + ), + ] diff --git a/djangocms_text_ckeditor/migrations_django/__init__.py b/djangocms_text_ckeditor/migrations_django/__init__.py new file mode 100644 index 0000000..e69de29