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:
parent
bd9fa0d6a6
commit
d961cfe1c7
2 changed files with 13 additions and 2 deletions
pokedex/db
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue