from pypn_habref_api.models import Habref, TypoRef from pypn_habref_api.env import ma [docs] class TypoRefSchema(ma.SQLAlchemyAutoSchema): [docs] class Meta: [docs] model = TypoRef [docs] load_instance = True [docs] include_fk = True [docs] class HabrefSchema(ma.SQLAlchemyAutoSchema): [docs] class Meta: [docs] model = Habref [docs] load_instance = True [docs] include_fk = True [docs] typo_ref = ma.Nested(TypoRefSchema, dump_only=True)