@@ -0,0 +1,1924 @@
+# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A# setColors :: %5B%7Bname :: String, color :: String%7D%5D%0AsetColors = %5B%7B'name': 'ALL Indic',        'color': 'E11D21'%7D,%0A             %7B'name': 'ALL Iranic',       'color': 'EEA2BE'%7D,%0A             %7B'name': 'ALL Anatolian',    'color': '654321'%7D,%0A             %7B'name': 'Tocharian',        'color': 'C9BA9D'%7D,%0A             %7B'name': 'ALL Balto-Slavic', 'color': 'FFFF00'%7D,%0A             %7B'name': 'Baltic',           'color': 'FF6701'%7D,%0A             %7B'name': 'Armenian',         'color': '7E0B80'%7D,%0A             %7B'name': 'Albanian',         'color': '999999'%7D,%0A             %7B'name': 'ALL Greek',        'color': '97E7FF'%7D,%0A             %7B'name': 'ALL Germanic',     'color': '002146'%7D,%0A             %7B'name': 'ALL Romance',      'color': '66FF00'%7D,%0A             %7B'name': 'ALL Celtic',       'color': '006301'%7D%5D%0A%0Adef forwards_func(apps, schema_editor):%0A    LanguageBranches = apps.get_model(%22lexicon%22, %22LanguageBranches%22)%0A    print('Coloring LanguageBranches%E2%80%A6')%0A    for set in  setColors:%0A        try:%0A            branch = LanguageBranches.objects.get(level1_branch_name=set%5B'name'%5D)%0A            branch.hexColor = set%5B'color'%5D%0A            branch.save()%0A        except:%0A            print('Could not color Branch: ', set%5B'name'%5D)%0A%0A%0Adef reverse_func(apps, schema_editor):%0A    LanguageBranches = apps.get_model(%22lexicon%22, %22LanguageBranches%22)%0A    print('Discoloring LanguageBranches%E2%80%A6')%0A    for set in  setColors:%0A        try:%0A            branch = LanguageBranches.objects.get(level1_branch_name=set%5B'name'%5D)%0A            branch.hexColor = ''%0A            branch.save()%0A        except:%0A            print('Could not discolor Branch: ', set%5B'name'%5D)%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B('lexicon', '0016_languagebranches_armenian')%5D%0A%0A    operations = %5B%0A        migrations.RunPython(forwards_func, reverse_func),%0A    %5D%0A

Add migrations/0017_languagebranches_addColors.py