2022-02-13 20:38:02 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
from .marshm import ma
|
2022-02-13 20:52:51 +01:00
|
|
|
from model import Meal
|
2022-02-13 20:38:02 +01:00
|
|
|
from .ingredientschema import IngredientSchema
|
|
|
|
|
|
|
|
|
|
|
|
class MealSchema(ma.ModelSchema):
|
|
|
|
|
|
|
|
# A list of author objects
|
|
|
|
authors = ma.Nested(IngredientSchema, many=True)
|
|
|
|
|
|
|
|
class Meta:
|
|
|
|
model = Meal
|