Skip to content

Ellar Serializer or ModelSchema (from ninja_schema) #191

Answered by eadwinCode
paolodina asked this question in Q&A
Discussion options

You must be logged in to vote

That's exactly how I'm utilizing the schemas now, and the controllers can use them without any issues. My confusion, which led me to try ninja_schema, stemmed from seeing some code examples that employed a DTO (btw, EventDTO), which I'd like to generate from a Django model. I had difficulty understanding the need for DTOs in this context, and how to effectively use them, as instinctively, Django models seemed to be sufficient for my needs.

Oh okay thats nice. So ellar-with-django project was designed to use a repository pattern. The repository interface requires a DTO to define data transfer schema. So EventDTO is there to serve the purpose.

(*) I started the last project using django-…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@eadwinCode
Comment options

Answer selected by paolodina
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants