Is ModelSchema Config class replacement for the Meta class? #1014
-
Hi! I'm a big fan of what you have accomplished with Django Ninja, I will use it in my next project. I was studying the documentation and I came across this part
from django.contrib.auth.models import User
from ninja import ModelSchema
class UserSchema(ModelSchema):
class Meta:
model = User
fields = ['id', 'username', 'first_name', 'last_name'] However, when trying this out you get an error saying that the Is this an outdated part of the documentation, or is there some nuance of the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @EmilTholin Could you share your ninja version ? (note Meta is available since 1.0, Config deprecated) |
Beta Was this translation helpful? Give feedback.
Hi @EmilTholin
Could you share your ninja version ? (note Meta is available since 1.0, Config deprecated)