Replies: 1 comment
-
@amzar96 not sure you understand you problem... I guess you just need to define to PlasesSchemas: class PlacesSchema(ModelSchema):
open_now_status: Optional[str] = None
class Meta:
model = model.Places
fields = ["place_name", "description", "link", "id"]
class PlacesSchemaSimplify(ModelSchema):
open_now_status: Optional[str] = None
class Meta:
model = model.Places
fields = ["place_name", "id"]
class PostFilterMapMakerOut(Schema):
places: List[PlacesSchema] # here
posts: List[PostSchema]
profiles: List[ProfileSchemaSimplify] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
[1]
I want to override the fields inside the class Meta (parent class).
parent class:
child class:
instead of having
fields = ["place_name", "id"]
I want to havefields = ["place_name", "description", "link"]
[2]
Inside the
views.py
how can I return the query result based on the schema format? Is it like thisBeta Was this translation helpful? Give feedback.
All reactions