1 # -*- coding: utf-8 -*-
2 from __future__ import unicode_literals
4 from django.db import models, migrations
7 def capitalize_objects(apps, schema_editor):
8 """Capitalize Polish names of things."""
9 Tag = apps.get_model('catalogue', 'Tag')
10 for tag in Tag.objects.filter(category='thing'):
11 tag.name = tag.name_pl = tag.name.capitalize()
15 class Migration(migrations.Migration):
18 ('catalogue', '0005_auto_20141016_1337'),
22 migrations.RunPython(capitalize_objects),