Uh oh!
There was an error while loading. Please reload this page.
Ellar Serializer or ModelSchema (from ninja_schema) #191
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm starting writing schemas for my app, I wonder if I can use PS. I forgot to say that (obviously) I'm using Ellar with Django via https://github.com/python-ellar/ellar-django-module |
Replies: 2 comments 1 reply
Hi @paolodina Thanks for trying out this project. The On the other side, ninja_schema creates a pydantic model at the end of its setup. So, I think you can use it as an input/output schema for your controller. Ellar will always convert to serializer model if its a pydantic type. |
Which is great. (*)
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, (*) I started the last project using django-ninja-extras, but found Ellar and restarted with it. But, what's your plans for them? What should I use? |
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
EventDTOis there to serve the purpose.