Vitaliy Kucheryaviy

Results 275 comments of Vitaliy Kucheryaviy
trafficstars

@bubthegreat sure, I think somewhere here we can add some extra flag to give each FK `_id` suffix: https://github.com/vitalik/django-ninja/blob/master/ninja/orm/factory.py#L34-L64

Hi @cltrudeau Use `.from_orm` + `.dict` or `.json` methods: ```Python job = Job.objects.get(id=1) data = JobOut.from_orm(job) data.dict() # will return python dict (that can be converted to json) data.json() #...

@cltrudeau sure - go ahead

@quroom ```Python qs = Job.objects.all()[:100] result = [JobOut.from_orm(i).dict() for i in qs] ```

@21adrian1996 well the philosophy for incoming payloads are only to validate types/structure but the database calls should happen inside the controller function Maybe try doing this (relation_id instead of relation):...

@fantasticle >>> .... >> This will yield a ninja.errors.ConfigError: Field(s) {'my_field'} are not in model. I think it should not - can you give your example ? Maybe workaround for...

@samandar021 Django by default do not parse files if method is **not** POST you can fix this with custom middleware: https://github.com/vitalik/django-ninja/issues/417#issuecomment-1092545699

Hi @tspanos for now you can use the following workaround - set Default value for each attr: ```Python class CarSchemaIn(ModelSchema): manufacturer: Optional[ManufacturerSchemaIn] = None manufacturer_id: Optional[int]= None drivers: Optional[List[DriverSchemaIn]] =...

@riseryan89 how do you import basic_error ? maybe you have some circular import...