1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Add a mapped_classes list, and a translation_classes list to each mapped class

This commit is contained in:
Petr Viktorin 2011-03-29 19:53:16 +03:00 committed by Eevee
parent bd9fa0d6a6
commit d961cfe1c7
2 changed files with 13 additions and 2 deletions
pokedex/db

View file

@ -145,6 +145,9 @@ def create_translation_table(_table_name, foreign_class, relation_name,
setattr(foreign_class, name + '_map',
association_proxy(relation_name, name, creator=creator))
# Add to the list of translation classes
foreign_class.translation_classes.append(Translations)
# Done
return Translations