This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
compte-agglo-montpellier/compte_agglo_montpellier/migrations/0002_add_blocks_to_text_plu...

29 lines
872 B
Python

# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from djangocms_text_ckeditor.models import Text
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
# Note: Don't use "from appname.models import ModelName".
# Use orm.ModelName to refer to models in this application,
# and orm['appname.ModelName'] for models in other applications.
for plugin in Text.objects.filter(plugin_type="TextPlugin"):
plugin.body = '<div class="block">%s</div>' % plugin.body
plugin.save()
def backwards(self, orm):
"Write your backwards methods here."
models = {
}
complete_apps = ['compte_agglo_montpellier']
symmetrical = True