|
@ -7,7 +7,7 @@ from django.db import migrations |
|
|
def resitel_to_osoba(apps,schema_editor): |
|
|
def resitel_to_osoba(apps,schema_editor): |
|
|
Resitel = apps.get_model('seminar','Resitel') |
|
|
Resitel = apps.get_model('seminar','Resitel') |
|
|
Osoba = apps.get_model('seminar','Osoba') |
|
|
Osoba = apps.get_model('seminar','Osoba') |
|
|
for r in Resitel.object.all(): |
|
|
for r in Resitel.objects.all(): |
|
|
o = Osoba() |
|
|
o = Osoba() |
|
|
o.datum_narozeni = r.datum_narozeni |
|
|
o.datum_narozeni = r.datum_narozeni |
|
|
o.datum_registrace = r.datum_prihlaseni |
|
|
o.datum_registrace = r.datum_prihlaseni |
|
@ -35,5 +35,5 @@ class Migration(migrations.Migration): |
|
|
] |
|
|
] |
|
|
|
|
|
|
|
|
operations = [ |
|
|
operations = [ |
|
|
|
|
|
migrations.RunPython(resitel_to_osoba), |
|
|
] |
|
|
] |
|
|