ajoute du code migration des données de fiber

This commit is contained in:
Benjamin Dauvergne 2013-04-08 03:28:22 +02:00
parent fdc403e373
commit 2323cd48da
1 changed files with 9 additions and 1 deletions

View File

@ -47,6 +47,14 @@ class Migration(SchemaMigration):
db.add_column(u'fiber_page', 'title_en',
self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True),
keep_default=False)
for page in orm.Page.objects.all():
page.title_fr = page.title
page.title_en = page.title
page.save()
for content_item in orm.ContentItem.objects.all():
content_item.content_markup_fr = content_item.content_markup
content_item.content_html_fr = content_item.content_html
content_item.save()
def backwards(self, orm):
@ -147,4 +155,4 @@ class Migration(SchemaMigration):
}
}
complete_apps = ['fiber']
complete_apps = ['fiber']