symposion_app/pinaxcon/registrasion/migrations/0011_add_2018_conf.py

20 lines
429 B
Python
Raw Normal View History

2018-09-30 20:37:08 +00:00
from django.db import migrations
def populate(apps, schema_editor):
PastEvent = apps.get_model("pinaxcon_registrasion","PastEvent")
PastEvent.objects.get_or_create(
year=2018, defaults={'name': '2018 Sydney'}
)
class Migration(migrations.Migration):
dependencies = [
('pinaxcon_registrasion', '0010_auto_20180929_1530'),
]
operations = [
migrations.RunPython(populate)
]