Commit afc1c441 by Clinton Blackburn

Corrected language punctuation...again

ECOM-5466
parent 695ec99a
...@@ -9,7 +9,7 @@ def fix_tag_names(apps, schema_editor): ...@@ -9,7 +9,7 @@ def fix_tag_names(apps, schema_editor):
LanguageTag = apps.get_model('ietf_language_tags', 'LanguageTag') LanguageTag = apps.get_model('ietf_language_tags', 'LanguageTag')
for tag in LanguageTag.objects.all(): for tag in LanguageTag.objects.all():
tag.name = tag.name.replace('', '-') tag.name = tag.name.replace('', '-')
tag.save() tag.save()
...@@ -19,5 +19,5 @@ class Migration(migrations.Migration): ...@@ -19,5 +19,5 @@ class Migration(migrations.Migration):
] ]
operations = [ operations = [
migrations.RunPython(fix_tag_names), migrations.RunPython(fix_tag_names, migrations.RunPython.noop),
] ]
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
def fix_tag_names(apps, schema_editor):
""" Replace dashes (—) in tag names with hyphens (-)."""
LanguageTag = apps.get_model('ietf_language_tags', 'LanguageTag')
for tag in LanguageTag.objects.all():
tag.name = tag.name.replace('–', '-')
tag.save()
class Migration(migrations.Migration):
dependencies = [
('ietf_language_tags', '0004_add_chinese_tags'),
]
operations = [
migrations.RunPython(fix_tag_names, migrations.RunPython.noop),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment