##// END OF EJS Templates
Show localized tags under the proper letter section in all tags list. Cache localized tag name, not the whole view
Show localized tags under the proper letter section in all tags list. Cache localized tag name, not the whole view

File last commit:

r1874:aaf6b563 default
r1892:0808e889 default
Show More
0062_auto_20170301_1053.py
23 lines | 616 B | text/x-python | PythonLexer
/ boards / migrations / 0062_auto_20170301_1053.py
neko259
Tag name is now stored in the alias with default locale
r1874 # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-01 08:53
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
def tag_name_to_alias(apps, schema_editor):
Tag = apps.get_model('boards', 'Tag')
TagAlias = apps.get_model('boards', 'TagAlias')
for tag in Tag.objects.all():
TagAlias.objects.get_or_create(name=tag.name, locale='default', parent=tag)
dependencies = [
('boards', '0061_auto_20170227_1739'),
]
operations = [
migrations.RunPython(tag_name_to_alias),
]