X-Git-Url: http://git.veekun.com/zzz-pokedex.git/blobdiff_plain/cc7913d7554e80c9999b65841ea3af16d5e18dae..c5f6490e3909ac1e8baa2930a48e794f1992d763:/pokedex/db/tables.py?ds=sidebyside diff --git a/pokedex/db/tables.py b/pokedex/db/tables.py index 5615fc6..0b2c80f 100644 --- a/pokedex/db/tables.py +++ b/pokedex/db/tables.py @@ -1572,20 +1572,10 @@ Move.super_contest_combo_prev = association_proxy('super_contest_combo_second', Move.target = relation(MoveTarget, backref='moves') Move.type = relation(Type, back_populates='moves') -Move.effect = markdown.MoveEffectProperty('effect') -Move.effects = markdown.MoveEffectsProperty('effect') -Move.short_effect = markdown.MoveEffectProperty('short_effect') -Move.short_effects = markdown.MoveEffectsProperty('short_effect') - MoveChangelog.changed_in = relation(VersionGroup, backref='move_changelog') MoveChangelog.move_effect = relation(MoveEffect, backref='move_changelog') MoveChangelog.type = relation(Type, backref='move_changelog') -MoveChangelog.effect = markdown.MoveEffectProperty('effect') -MoveChangelog.effects = markdown.MoveEffectsProperty('effect') -MoveChangelog.short_effect = markdown.MoveEffectProperty('short_effect') -MoveChangelog.short_effects = markdown.MoveEffectsProperty('short_effect') - MoveEffect.category_map = relation(MoveEffectCategoryMap) MoveEffect.categories = association_proxy('category_map', 'category') MoveEffect.changelog = relation(MoveEffectChangelog, @@ -1944,3 +1934,13 @@ for table in list(table_classes): for table in list(table_classes): if issubclass(table, LanguageSpecific): table.language = relation(Language, primaryjoin=table.language_id == Language.id) + +Move.effect = DefaultLangProperty('effects') +Move.effects = markdown.MoveEffectsProperty('effect') +Move.short_effect = DefaultLangProperty('short_effects') +Move.short_effects = markdown.MoveEffectsProperty('short_effect') + +MoveChangelog.effect = DefaultLangProperty('effects') +MoveChangelog.effects = markdown.MoveEffectsProperty('effect') +MoveChangelog.short_effect = DefaultLangProperty('short_effects') +MoveChangelog.short_effects = markdown.MoveEffectsProperty('short_effect')