ajoute du code migration des données de fiber
This commit is contained in:
parent
fdc403e373
commit
2323cd48da
|
@ -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']
|
||||
|
|
Reference in New Issue