Skip to content

Conversation

pinguin999
Copy link
Contributor

@vitalik
Copy link
Owner

vitalik commented Sep 11, 2025

Hi @pinguin999

Well that's an open question actually

In django ninja we try to avoid "model" word as in django universe it's mainly mean database table

Currently both .dict and model_dump are supported without any deprecation warnings - what should be at the end - i'm not sure yet

and I would like to hear some other opinions...

@pinguin999
Copy link
Contributor Author

For me dict is a python keyword. So I would try to avoid using it for other functions.

@pmdevita
Copy link
Contributor

pmdevita commented Sep 11, 2025

It seems like we'd either have the current situation, where new users like darshan-roon are confused about why there are two methods that do the same thing, or if we drop it, we potentially have confusion about it being named model like vitalik said.

I have sort of come to the idea that as users get comfortable with Ninja, they should also come to be comfortable with Pydantic, just as one would using FastAPI. This makes me less in favor of having an alias then, as it may make for confusion in teaching Pydantic.

EDIT: darshan-roon ended not being a great example because they had prior Pydantic experience

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants