# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-03 01:39
from __future__ import unicode_literals
import json
from django.db import migrations


def migrate_templates(apps, schema_editor):
    Template = apps.get_registered_model('main', 'Template')
    for template in Template.objects.all():
        template.data = json.loads(template.template_data)
        template.save()


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('main', '0023_auto_20171110_1709'),
    ]
    operations = [
        migrations.RunPython(migrate_templates),
    ]
