1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
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),