29 lines
751 B
Python
29 lines
751 B
Python
# -*- coding: utf-8 -*-
|
|
# Generated by Django 1.11.18 on 2019-04-26 09:24
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import migrations
|
|
|
|
|
|
def create_backends(apps, schema_editor):
|
|
PaymentBackend = apps.get_model('lingo', 'PaymentBackend')
|
|
Regie = apps.get_model('lingo', 'Regie')
|
|
for regie in Regie.objects.all():
|
|
pb = PaymentBackend(
|
|
label=regie.label, slug=regie.slug, service=regie.service,
|
|
service_options=regie.service_options)
|
|
pb.save()
|
|
regie.payment_backend = pb
|
|
regie.save()
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('lingo', '0034_auto_20190426_1159'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.RunPython(create_backends),
|
|
]
|