Skip to content

Commit

Permalink
Rework LC curricula
Browse files Browse the repository at this point in the history
This fixes #1419 by rewording 'lc' curriculum, and adding 'lc-other'.
  • Loading branch information
pbanaszkiewicz committed Dec 5, 2018
1 parent 5b5be4f commit a517556
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions amy/workshops/migrations/0168_change_LC_curricula.py
@@ -0,0 +1,36 @@
# Generated by Django 2.1.2 on 2018-12-05 17:21

from django.db import migrations


def change_LC_curricula(apps, schema_editor):
"""Populate database with Curriculum objects."""
Curriculum = apps.get_model('workshops', 'Curriculum')
data = {
'lc': dict(
name='Library Carpentry (Intro to Data, Unix Shell, Git, and/or '
'OpenRefine)',
active=True,
unknown=False,
),
'lc-other': dict(
name='Library Carpentry (other)',
active=True,
unknown=False,
),
}
for slug, defaults in data.items():
Curriculum.objects.update_or_create(
slug=slug,
defaults=defaults,
)


class Migration(migrations.Migration):
dependencies = [
('workshops', '0167_auto_20181116_1814'),
]

operations = [
migrations.RunPython(change_LC_curricula)
]

0 comments on commit a517556

Please sign in to comment.